27
0
AD

Attribute involved Password Never Expires

27

Regular expressions to track the list of users with no password expiration from Microsoft Active Directory.

  • Windows PowerShell
Get-ADUser -Filter * -Properties * | Select-Object Name, SamAccountName, Enabled, LastLogonDate, PasswordLastSet, PasswordNeverExpires, AccountLockoutTime, Created, Description

Export:
out-gridview -title "PasswordNeverExpires" – Output to window
Export-Csv -NoTypeInformation -encoding UTF8 "C:\file.csv" – Output to File

Leave a Reply

Your email address will not be published.