How to change default OU for computers in AD
Let’s get started
First we are going to need the DN (Distinguished Name) of the OU we want to set as our default.Quick way to find the DN is to launch Active Directory Users and Computers.
Click on View and select Advanced Features.
You will notice there are more containers within the tree view now.
Navigate and right-click the OU you want to set as the default, then select Properties.
In the OU Properties, select the Attribute Editor tab.
Click on distinguishedName to highlight it, then click View.
Right-click the highlighted value and select Copy. Click Cancel and then OK to close the Attribute Editor and OU Properties windows.Launch an elevated PowerShell prompt by right-clicking the PowerShell icon in the taskbar and selecting Run as Administrator.
At the prompt, type the following: redircmp <Container-DN> where CONTAINER-DN is the distinguished name of the container you previously copied to the clipboard that will become the default location for newly created computer objects
[powershell]redircmp "OU=_WDS,OU=NOTCREATIVE OU,DC=NOTCREATIVE,DC=internal"[/powershell]
NOTE: If you have spaces in your OU name, make sure to wrap the DN with double quotes.
Then press Enter.
If your result shows Redirection was successful, you should be done.
Join a client computer to the domain and verify it was placed in the new OU.
Note: make sure the computer object is not already in AD somewhere. If it is, delete the object if the computer is no longer joined to the domain. Otherwise, when you join the computer back up, it will be in the same OU it was in.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.