Active Directory: Redirecting New Users and New Computers to a Specified OU

By default when a new user is created in Active Directory the object will be created under the top level User container (CN=User), similarly when a computer is created it will be created in the top level Computers container (CN=Computers).

If you would like to change this behaviour then this is how.

Note: Your domain functional level must be at at least Windows Server 2003

First create your desired Organisational Units for both Users and Computers.

Next you will need to find the DN’s of your OU’s, if you are unsure how to find these take a look at this article Active Directory: Finding and Copying the DN of an Object using LDP.exe

Either on you computer or on a domain controller run the below commands to make the changes.

To Redirect Users

C:\Windows\System32\redirusr DN_of_new_OU

For example:

C:\Windows\System32\redirusr ou=myusers,DC=mydomain,dc=com

To Redirect Computers

C:\Windows\System32\redircmp DN_of_new_OU

For example:

C:\Windows\System32\redircmp ou=mycomputers,DC=mydomain,dc=com

Note

If your DN contains spaces etc you will need enclose the DN with quotes.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.