Find AD User Password Last Set

This one liner was used when the password age group policy was reduced. It caused a massive amount of users not being able to login due to the password expiry policy now in place. We needed to find the password age so we used the PasswordLastSet attribute on each AD User to export to s CSV and manipulate to find effected users.

 

Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties * | Select DisplayName, PasswordLastSet | Export-csv C:\Password.csv

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.