Help, finding out password expiry date of specific user

Hi All,

What short PowerShell command can I use to find out password expiration date of a specific user?

Thank you,

Have you heard about a technology enabling people to search the internet for specific things? :wink:

Powershell Active Directory password expiration date

You can try the below scipt:

Import-Module ActiveDirectory
Get-ADUser -SearchBase “OU=TestOU,DC=TestDomain,DC=Local” -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} -Properties “SamAccountName”,“msDS-UserPasswordExpiryTimeComputed” |
Select-Object -Property “SamAccountName”, @{Name=“Password Expiry Date”; Expression={[datetime]::FromFileTime($_.“msDS-UserPasswordExpiryTimeComputed”)}} |

You may also take help from the following links which assists you to email users a active directory password expiration notification and schedule reports, alerts with all password expiration related tasks.

thank you for your response, but, is there a way to revert back on this?