Quickly Enable All User or Computer Accounts in an Active Directory OU
Enable-ADAccount PowerShell cmdlet can be used to enable a particular or all accounts in an OU.
For example, to enable a particular user account, execute below command:
- Enable-ADAccount -Identity NickSharma
And to enable all accounts in an Active Directory OU, use below command:
- Get-ADUser -Filter 'Name -like "*"' -SearchBase "OU=TempUsers,DC=Test,DC=Local" | Enable-ADAccount
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].