Just a quick post today to show you how to change the default OU for both Users and Computers.
Why would you want to do this? This is advantageous to help manage your active directory. For instance, when a new computer is added to the domain, it will automatically get added to the OU you've nominated, rather than the default Computers folder. Therefore, it saves you having to manually move computers to the OU you have setup to house them.
Let's get started...
First open up Active Directory Users and Computers and follow the screenshot below:
This ensures that you have the Advanced Features enabled so we can obtain additional information about our nominated OU.
We'll change the default computer OU first. Right click on the OU you've created for your computers and select Properties. The following screen will be displayed:
Once you're on the Attribute Editor tab, scroll down until you find the value distinguishedName as in the following example:
The distinguishedName value holds the AD string that we're going to need to use in the next step. Double click the value to reveal the entire string so we can copy the value:
Right click and copy the string so we can use it in the next step. Now open up an admin command prompt. At the command line type in or copy and paste the following:
redircmp OU=Computers,OU=Company,DC=office,DC=Company,DC=com,DC=au
In the command line syntax above, replace my example string OU=Computers,OU=Company,DC=office,DC=Company,DC=com,DC=au with the value you copied from your Attribute Editor in the previous step.
That's it, you're all done with the setting the default computer OU for your Active Directory.
We can now do the same for your users. The steps are identical to the above, obviously using your Users OU Attribute Editor String. Then using the following command line syntax to set it:
redirusr OU=Users,OU=Company,DC=office,DC=Company,DC=com,DC=au
In the command line syntax above, replace my user example string OU=Users,OU=Company,DC=office,DC=Company,DC=com,DC=au with the value you copied from your Tribute Editor for the Users Attribute String.
That's it you're all done. Now when you add a new users or computer to your domain they will be automatically added to the correct OU.
If you've found this useful, you may want to sign up to our newsletter where you'll receive notices on when we post new articles and helpful "how tos". Just fill out your details below and we'll do the rest…
2 Responses