Windows – Active Directory – Join domain in specific OU when its a workstation

active-directorydomainwindowswindows-server-2008

I would like to know how can I accomplish the following:

When I join a workstation (with Windows 7) in the domain, I want that computer to be put into a specific OU. Only when its a workstation with Windows 7. This is because I have GPOs that must apply to all workstations in the domain.

Can I only accomplish this using a script? Or can I set a rule like if the computers has Windows 7, put that computer into this specific OU.

Best Answer

By default all computers joined to the domain will go the Computers container, unless you pre-stage a computer object in a specific OU. You could modify this by changing the default path for computer objects using redircmp.exe (found in %SYSTEMROOT%\System32). For example:

redircmp OU=win7,DC=company,DC=com

This would change the default path to the Win7 OU, under the root of the domain.

See Redirecting the users and computers containers in Active Directory domains for more info.

You could specify your OU for the Windows 7 machines as the default, then if needed, pre-stage any workstations/servers you don't want in the Windows 7 machine OU elsewhere.

Our you could simply move the objects to the required OUs after they've been joined to the domain and wait for GPO processing to re-occur.