Subscribe to Windows IT Pro
November 27, 2003 12:00 AM

How can I use the Windows 2000 and later Netdom command to specify an organizational unit (OU) when I join my computer to a domain?

Windows IT Pro
InstantDoc ID #40934
Rating: (1)

A. If you add a computer to a domain from the Computer Name tab of the Control Panel System applet, Active Directory (AD) will place the computer in the default Computers container. However, the most recent versions of Netdom (2.0 and later) let you specify an OU when joining a computer to a domain. To specify an OU and the OU's distinguished name (DN) when using the Netdom command, type

netdom join <computer name> /domain:<domain 
name> /userd:<domain user> /passwordd:<domain
password> /OU:<DN for OU>

For example,

netdom join neutron /domain:savilltech.com /userd:john 
/passwordd:youwish /OU:"OU=LONDON,DC=SAVILLTECH,DC=COM"

joins computer Neutron to domain savilltech.com in the LONDON OU. (Although I've included quotes in my example, you need to use quotes only if the OU's DN contains spaces; however, adding the quotes doesn't hurt.)

Two optional switches, /UserO and /PasswordO, are necessary only if the logged-on user doesn't have administrative rights on the computer that's joining the domain. In such a scenario, you can add these switches to specify a local administrative account to use while running the command.

Related Content:

ARTICLE TOOLS

Comments
  • Jay
    7 years ago
    Nov 29, 2005

    Hi
    This great. What would need to replace the if I wanted to the utility to pick up the computer name as it was run, say if it was run from a batch file and there were many PC's for it to be run on at once?

    Thanks.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.