Syntax

# Find DC list from Active Directory
$DCs = Get-ADDomainController -Filter *

# Define time for report (default is 1 day)
$startDate = (get-date).AddDays(-1)

# Store successful logon events from security logs with the specified dates and workstation/IP in an array
foreach ($DC in $DCs){

Download Full Script

Login type: remote logon or local logon

Date:

Status: success for failure.

User name:

Workstation name:

IP address:

Purpose:To check AD User Logons
Modification:NA
Type:PowerShell (.ps1)
Compatibility:Run with PowerShell
Tags:AD, Active Directory, User Logon Report
Reference link: