Determine AD account password expiry date
Posted on October 19, 2014
- and tagged as
- active-directory
Two quick methods to find the password expiry date of an Active Directory user account.
With cmd.exe
net user <username> /domainWith PowerShell
A bit longer but potentially more useful for integration into larger scripts.
Get-ADUser -Identity <username> –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" | Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}Alternatively Identity <username> can be replaced with -Filter * to show all accounts.