Table of ContentsHere in this write-up, we provide you not one or two but three separate methods for the same. But before we see what the methods are, let’s check the reasons for finding the password expiration date.
Why Admins Look For Password Expiration Date in AD
Like the reasons to check the last password change in AD a password expiry inquiry is also done with security in mind. Organizations that make their users change login credentials have a stronger security framework. Moreover, if passwords ever get leaked, triggering an expiry request can prevent backdoor access. Compliance requirements are not new for admins who look after an AD. To make sure their organization is following what’s required admins may set up a password expiry policy. If a change in personnel occurs the new admin must quickly check what the date set by the previous admin was. Knowing which users are locked out and not manually disabled is key to exporting disabled users from Active Directory as well. All of this can only be done if administrators have access to a list. So let us start by looking at the most requested PowerShell methods for identifying password expiration dates. Now, let’s dive into the hidden command line method for identifying password expiration dateEasiest Way to Get Active Directory Password Expiration Date
Open a command line(cmd) instance and type:net user %username% /domain | findstr /C:"Password expires"
Breakdown of the command
Here “%username%” is a placeholder for the currently logged-in account.
The “/domain” part is to move the scope on the AD instead of the local machine.
The “findstr” and corresponding filter limit the output to and only display the “Password expires” data.
One out of two outputs may occur: either you get a date or a text that says “Never”.
This sort of result may be enough for a quick glance. However, for reporting purposes, admins need something more sophisticated.
Although admins and other privileged users can replace the placeholder with any other username and check their password expiry date as well this is time-consuming and defeats the purpose of the task. So that’s why admins move toward PowerShell which has more tools to display the results in bulk.
Get the Default AD Password Expiry Date with A PowerShell cmdlet
Experienced AD admins might already know this, but for those who are new to Active Directory user management, this serves as a starting point.Also Read: How to View User Attributes in Active Directory & Get Attribute List?
By default, every AD sets the password expiry date to 42 days after the last change. Therefore, if the “password never expires” checkbox is not marked during user creation and no custom updates are made to the Password Policy then you may use the following cmdlet. It will add 42 days to the last password update and display when it expires.Get-ADUser -Filter * -Properties DisplayName, pwdLastSet | Select-Object DisplayName, @{Name="pwdLastSet";Expression={[datetime]::FromFileTime($_.pwdLastSet)}}, @{Name="PasswordExpires";Expression={[datetime]::FromFileTime($_.pwdLastSet).AddDays(42)}} | Format-Table -AutoSize
How to Check When Password Expires in Active Directory Via Advanced PowerShell Scripts
Use the following scripts on a Windows PowerShell module to get a list of all users having an expiration date. Note: This first cmdlet only shows the date of all users whose password is about to expire: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")}}
We also have a “.ps1” script for you to highlight the users whose passwords may expire. It also tells you the users whose password will remain as it is.
Script to classify users based on their password expiry.
Get-ADUser -Filter * -Properties msDS-UserPasswordExpiryTimeComputed | Select-Object Name, @{Name="PasswordExpiry";Expression={[System.DateTime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed").ToString("yyyy-MM-dd HH:mm:ss")}}
Those who are not comfortable with PowerShell can use the command line queries as directed.
Fetch Active Directory Password Expiration Date with Command Line
See the entire user password expiry listdsquery user -limit 0 | dsget user -display -samid -acctexpires -disabled
Even these cmd-level codes are too tricky, not to mention risky. So to avoid the scripts entirely, you may choose the Active Directory Users and Computers snap-in.
Use ADUC and See If User Passwords Expires or Not
- Search for Active Directory Users and Computers and open it.

- Click on the View option from the Dropdown mark Advanced Features.

- Double-click on the Users container.

- Right-click on the user whose password data you want to view and hit Properties.

- In the properties window, go to Attribute Editor.

- Type “user”, it should highlight the userAccountControl attribute.

- Open Active Directory Admin Center via the Server Manager or Windows search bar. Go to the Users Tab
- Select a User
- Click on the View Resultant Password Settings option from the rightmost pane.
- A new box opens there look for the Enforce Maximum Password age option.

- No password setting policy exists in the Active directory.
- If set, the Password Setting policy is not applied to this user.

Professional Way to Check Password Expiry Date in Active Directory
For that use the SysTools AD Reporting Software. This tool trims down the manual effort required by admins. It does so by replacing the problematic scripts and commands with an entirely GUI-based setup. With little to no training, any admin will be able to pull their AD’s user password expiry data and present it in a readable format. The tool has its own Preview window and multidomain addition feature. So admins who are responsible for more than one domain can just add the AD domains and start listing out all the information that’s required. With the help of a dashboard date filter, you can slice the decades-long data into more manageable chunks. You might be wondering how this tool packs so much in a single package. For that follow the steps below and find out how its intuitive interface works.Automated Steps to See User Password Expiry Parameter in AD
- Open the tool on your machine and log in with the (administrator) credentials appear on the screen.

- Push the “Register Domain Controller” button with your cursor to add your domain IP.

- Put the custom “Domain Friendly Name” and the correct “IP address” in the spaces provided inside the pop-up window. Then Tap the Save & Continue Button.

- On the Domain Details page fill in your admin credentials, and Validate them with the help of the Save and Continue button.

- Toggle the Report Tab and select the Password Never Expired category inside Users.

- Click on the Duration option to set a premade date range or use the Custom option to make your timeline.

- Click on the Preview button to check password expiration in Active Directory.

- To get Active Directory Password Expiration Date in CSV format press the Download button and Choose CSV from the dropdown.

Conclusion
In this tutorial, readers learned how to check when password expires in Active Directory via PowerShell and other means. As the PowerShell Scripts and its sister command line methods are complicated, we gave the use case for ADUC. However, that too has its problems. Therefore, as a sure shot measure, admins can use the utility pitched earlier. With it, any reporting task, like the one to find user password expiry can be done without much effort.Frequently Asked Questions After Viewing AD User Password Expiry Date
How can I Set Up a New Password Policy Via the Admin Center?
- Expand the arrow next to the domain name.
- Click on System.
- Choose Password Settings Container.
- Click on New > Password Settings.

- Fill in all the required details then go to the Directly Applies tab and put all the users you want.
Is there a way to see the password expiry date via Event Viewer?
No, the Event Viewer does not generate any Event ID for password expiry. Moreover, trying to guess a date based on a failed logon event is difficult and error-prone.
From where an admin can deploy a domain-wide password expiry policy?
It can be done via the group policy edit portal. Follow these steps.
- Press Windows + R and type “gpme.msc” in the run module.
- In the Browse for a Group Policy Object window choose a Group Policy.
- Inside the Group Policy Management Editor Screen follow this path
- Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Password Policy
- The Password Policy Attributes appear on the Right Pane. Select the Maximum password age option and check the details present in the window.

