>NULL: 2026

Wednesday, 28 January 2026

Set Windows user not to expire via CMD

 To set a local Windows user password not to expire use the following.

wmic UserAccount where Name='username' set PasswordExpires=False


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