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