How Can We Help?
How to Get AD Users Password Expiration Date
Method 1: Using Net User command to Display User Expiration Date
This first method uses the net user command that is built into windows. This command is used to add, remove and make changes to user and computer accounts.
To determine when the password will expire for a single account open the command prompt and type the following command:
Net user USERNAME /domain
In the below screenshot is an example for the user mfoster.
In addition to displaying the password expires date it also provides other useful information such as password last set, when the password can be changed, if the account is active and so on.
Method 2: Using PowerShell To List All Users Password Expiration Date
To query user information with PowerShell you will need to have the AD module installed. If you have the RSAT tools loaded then you are good to go.
To find the date the password was last set, run this command.
get-aduser -filter * -properties passwordlastset, passwordneverexpires |select Name, passwordlastset, Passwordneverexpires
In the screenshot below you can see it returns all users, password last set date and if the password never expires.
To export any of the PowerShell results to a CSV just add | export-csv FILEPATH to the end.