081216_0937_GetActiveDi1.png

Get Active Directory Password Change Dates – 60 second solutions

Here’s another very useful script which simply lists all of your users in Active Directory, sorted by when their passwords were last changed.

Great for checking if your password policies are actually being enforced…

Import-Module ActiveDirectory #This may be done automatically when issuing the next line
Get-ADUser –Filter * -Properties PasswordLastSet, PasswordNeverExpires | Sort PasswordLastSet | FT Name, PasswordLastSet, PasswordNeverExpires

And that will give you something like this:

Pretty nifty!

You can export to a CSV should you have many users to look through:

…. | Export-CSV –Path PasswordResets.csv #to insert instead of “FT Name…”

Leave a Reply

Your email address will not be published. Required fields are marked *