How can I verify if an AD account is locked? How can I verify if an AD account is locked? powershell powershell

How can I verify if an AD account is locked?


The LockedOut property is what you are looking for among all the properties you returned. You are only seeing incomplete output in TechNet. The information is still there. You can isolate that one property using Select-Object

Get-ADUser matt -Properties * | Select-Object LockedOutLockedOut---------False

The link you referenced doesn't contain this information which is obviously misleading. Test the command with your own account and you will see much more information.

Note: Try to avoid -Properties *. While it is great for simple testing it can make queries, especially ones with multiple accounts, unnecessarily slow. So, in this case, since you only need lockedout:

Get-ADUser matt -Properties LockedOut | Select-Object LockedOut


Here's another one:

PS> Search-ADAccount -Locked | Select Name, LockedOut, LastLogonDateName                                       LockedOut LastLogonDate----                                       --------- -------------Yxxxxxxx                                        True 14/11/2014 10:19:20Bxxxxxxx                                        True 18/11/2014 08:38:34Administrator                                   True 03/11/2014 20:32:05

Other parameters worth mentioning:

Search-ADAccount -AccountExpiredSearch-ADAccount -AccountDisabledSearch-ADAccount -AccountInactiveGet-Help Search-ADAccount -ShowWindow


If you want to check via command line , then use command "net user username /DOMAIN"

enter image description here