Home > Microsoft > How to find locked out users by using PowerShell

How to find locked out users by using PowerShell

March 19, 2013

To retrive a list of locked user in Active Directory use these PowerShell commands:

1. start powershell on one of your domain controllers
2. import AD module: “Import-Module ActiveDirectory”
3. search for locket users: “Search-ADAccount -LockedOut | select name”
4. unlock users: “Search-ADAccount -LockedOut | Unlock-ADAccount -Confirm”

If number 4 fails, unlock users manualy from ADUC.

locket_users

%d bloggers like this: