Export (0) Print
Expand All

Finding Users Whose Passwords Never Expire

Published: July 29, 2010

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.

noteNote
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

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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft