Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Where would you like this rule to run on? – Jim B Jun 1 '12 at 18:50
Do you want the all to go to the same OU or would some go to a different OU? – MDMarra Jun 1 '12 at 18:59
I just want all employees workstations on the same OU, non-workstations on a different OU. – Jonathan Rioux Jun 1 '12 at 19:04
Are these new image deployment? If so, you could look at using MDT to deploy the image and set it up to join to that specific OU. – Bad Dos Jun 3 '12 at 17:50

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.

share|improve this answer
Cant I redirect computers to specific OUs based on their OS current ? – Jonathan Rioux Jun 1 '12 at 19:30
Not that I'm aware of. Why not just pre-create the computer objects in the proper OU THEN join to the domain? – HostBits Jun 1 '12 at 20:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.