How to check user password expiration date

If your company enables Password expiration policy, the users should receive a notification before they expire. This article shows you how to check the password expiration date by running commands.

1.Checking the password’s expiration date for a user in local computer

* In the Search bar, type CMD, and click Open.

• Type this command:

net user /domain %username%

2. Checking a user password expiration date •Run Administrator Command Prompt

•Run this command:

net user username /domain

Note: Type real username replacing username

3. Check all domain users’ expiration date using PowerShell

* In the Search bar, type powershell, and click on Run as Administrator

* Run this command:

get-aduser -filter * -properties passwordlastset, passwordneverexpires |ft Name, passwordlastset, Passwordneverexpires

•To display the expiration date rather than the password last set date, use this command:

Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties “DisplayName”, “msDS-UserPasswordExpiryTimeComputed” |

Select-Object -Property “Displayname”,@{Name=”ExpiryDate”;Expression={[datetime]::FromFileTime($_.”msDS-UserPasswordExpiryTimeComputed”)}}

* To export any of the PowerShell results to a CSV just add | export-csv FILEPATH to the end

Please view this step by step video:

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com