PowerShell Tip: List locked-out accounts in Active Directory

In this PowerShell Tip I’ll show you how to use Active Directory cmdlets to identify locked-out user accounts and computer accounts.

First type the command Search-ADAccount to get help information:

Search-ADAccount -?

As you can see in the screenshot above there is a parameter -LockedOut. Now type the command:

Search-ADAccount -LockedOut

In this example I just locked out my account for testing purposes and as you can see the command displayed that my account is locked out.

Just type in Search-ADAccount -? to see more examples below the related links.

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=291105
Clear-ADAccountExpiration
Disable-ADAccount
Enable-ADAccount
Get-ADAccountResultantPasswordReplicationPolicy
Set-ADAccountControl
Set-ADAccountExpiration
Set-ADAccountPassword
Unlock-ADAccount

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s