Unlocking a user account on a specified Domain Controller
You can use Active Directory Users and Computers snap-in to unlock an user account. In case you do not know the name of the domain controller where the user account got locked, you need to connect to each domain controller using Active Directory Users and Computers and then unlock the user account. Unlock-ADAccount PowerShell cmdlet can help you unlock user account on all domain controllers.
- Create a Text file.
- Specify all the domain controllers in it.
- Run below command to unlock an user account on all domain controllers.
- For /F "Tokens=*" %L IN (DCList.TXT) DO Unlock-ADAccount NickS -Server %L
Above command unlocks user account named NickS all domain controllers specified in the DCList.TXT file.
About Nirmal Sharma
Nirmal is a MCSEx3, MCITP and was awarded Microsoft MVP award in Directory Services and Windows Networking. He is specialized in Directory Services, Failover cluster, Hyper-V, System Center, Windows Azure, and Exchange Servers and has been involved in Microsoft Technologies since 1994. In his spare time, he offers technical help by writing tips and articles on several web sites. Nirmal can be reached at [email protected].