Get date of when the password was last set (converts date of PwdLastSet from 8 bti integer to readable form), and lists how many bad logon attempts there have been.  Make sure you are using the PowerShell with Active Directory Module (Start, Administrative Tools, Active Directory Module for Windows Powershell, issue an ‘import-module activedirectory’ from a plain PowerShell prompt) :
get-ADuser -filter {(ObjectClass -eq "user")} -Properties * | FT Name, PasswordLastSet, BadPwdCount

We can add a sort to help identify old passwords:

get-ADuser -filter {(ObjectClass -eq "user")} -Properties * | sort PasswordLastSet -descending | FT Name, PasswordLastSet, BadPwdCount
Of course we could also use dsquery, but it doesn’t offer as much flexibility:

dsquery * -filter "&(objectClass=person)(objectCategory=user)" -attr cn badPwdCount

You must be logged in to leave a reply.