Active Directory Users and Computers

Is there a way to unlock multiple AD accounts from Console?
Hiroyuki TamuraField EngineerAsked:
Who is Participating?
You are better off using Powershell.

You can use the command Unlock-ADAccount. Example:

GET-ADUSER –filter * –searchbase ‘CN=Legal,CN=Boston,DC=Blueville,DC=Local’ | UNLOCK-ADACCOUNT

you can even filter by locked users, and have them all unlocked at once, using this simple command

Search-ADAccount –LockedOut | Unlock-ADAccount
Shaun VermaakTechnical Specialist/DeveloperCommented:
FOXActive Directory/Exchange EngineerCommented:
Right-click the container>properties>attribute editor>select distinguished name>view   right-click copy the distinguished name

Open up powershell as an administrator
1. first command  
Import-Module ActiveDirectory  (press enter)
2. next command
Get-ADuser -properties * -filter * -Searchbase "pastedistinguishednamehere" | %{Unlock-AdAccount}       (press enter)
Hiroyuki TamuraField EngineerAuthor Commented:
Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.