How to modify an OU in Active Directory?
Read on to know how to modify an OU in Active Directory using PowerShell and how you can get it done easier with ADManager Plus, a comprehensive Active Directory management solution.
Steps to modify an OU using powershell :
- Identify the domain in which the OU to be modified is located.
- List the attributes that have to be modified.
- Create and compile the script for modifying the desired attribute of the OU. Execute the script in PowerShell.
- Sample script for modifying the description of an OU:
Click to copy entire script
Set-ADOrganizationalUnit -Identity "OU=IndiaUsers,DC=EXAMPLE,DC=COM" -Description "This OU contains all Indian users of Example.com"
How to modify an OU in Active Directory :
- Navigate to Management > OU Management > Modify Single OU .
- Select the OU you wish to modify.
- Enter the description as "This Organizational Unit holds all of the users accounts of Example.com" and click Update OU.
» Start 30-day Free Trial
Although modifying an OU with native toools like PowerShell looks simple, it comes with a few limitations like:
- PowerShell script can be run only from the computers which have the Active Directory Domain Services role installed in them.
- The script has to be rewritten if additional attributes are to be modified.
- Need for a new script, in case multiple OUs are to be modified.
- The syntax, parameters and iterations need to be correct. A typo or incorrect syntax might be difficult to spot and rectify especialy when the script is a long one.
ADManager Plus lets you perform the same with a few clicks, from its web based GUI console. It also has options to modify multiple OUs simultaneously with templates and by importing a CSV file containing the modified attribute values.