>NULL: Produce a last logon report on Active Directory

Tuesday, 27 January 2026

Produce a last logon report on Active Directory

The following PowerShell command will produce a csv file with username, last login date and time, and 'user enabled' columns. 

Get-LocalUser | Select-Object Name, LastLogon, Enabled | Export-Csv -Path "C:\path\to\your\LastLogonReport.csv" -NoTypeInformation

 

No comments:

Post a Comment