NETDOM question - join machine to OU

Posted on 2005-04-08
Last Modified: 2012-05-05

I'm attempting to join a PC to a domain and OU, but I;m not having any luck:

netdom.exe add %computername% /Domain:AD /UserD:MYID /PasswordD:********* OU/:ou=Computers,ou=My Branch,ou=Unit,dc=ad,dc=company,dc=com

I keep on getting the error:
 The parameter OU/:ou=Computers,ou=My was unexpected.
 The parameter is incorrect.

If I use quotes around the OU name, I get:
 The parameter OU/:ou=Computers,ou=My Branch,ou=Unit,dc=AD,dc=Company,
c=Com was unexpected.
 The parameter is incorrect.

How can I get this to work???
Question by:Marketing_Insists

    Author Comment

    any commandline method would be great.  VB or whatever
    LVL 82

    Accepted Solution

    Just in case, as it's appearing three times: it should be /ou:"some OU", not OU/:.
    netdom.exe add %computername% /Domain:AD /UserD:MYID /PasswordD:********* /OU:"ou=Computers,ou=My Branch,ou=Unit,dc=ad,dc=company,dc=com"
    Note that if you specify a OU, you have to run the netdom command on the DC itself, you can't run it from a client.
    Maybe of help:
    Automating the Creation of Computer Accounts
    LVL 27

    Expert Comment

    What happens when you use \ instead of /   ?

    Expert Comment

    If the LDAP connector in netdom.exe uses SQL commands you might have to use single quotes ‘ instead of the ordinary double quotes “

    Author Comment

    got errors when I used \ instead of /  

    Bummer if I can only run this command on a DC, (no login rights)  Maybe I can get.
    LVL 82

    Expert Comment

    What you could try instead (assuming you have the permissions to do so) is to create the account in the standard OU, then use dsmove.exe (part of the W2k3 adminpak.msi) to move it into the target OU.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
    Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now