Share via

Finding Users Whose Passwords Never Expire

Updated: April 18, 2013

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 with SP1, Windows Server 2012, Windows Server 7

This topic explains how to use the Active Directory module for Windows PowerShell to find users whose passwords never expire.


For Windows Server® 2008 R2, the following example requires the following additional Import-Module ActiveDirectory command to be run first. This command is needed to manually import the Active Directory module, which also needs to be installed as part of Active Directory Domain Services (AD DS) management tools. Beginning with Windows Server® 2012 this is not necessary as installed modules are automatically imported into a session when any commands within a module are used.


The following example demonstrates how to find all the users whose passwords never expire:

Search-ADAccount -PasswordNeverExpires | FT Name,ObjectClass -A

Additional information

For a full explanation of the parameters that you can pass to Search-ADAccount, at the Active Directory module command prompt, type Get-Help Search-ADAccount –detailed, and then press ENTER.