• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2321
  • Last Modified:

NETDOM question - join machine to OU


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???
0
Marketing_Insists
Asked:
Marketing_Insists
1 Solution
 
Marketing_InsistsAuthor Commented:
any commandline method would be great.  VB or whatever
0
 
oBdACommented:
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
http://support.microsoft.com/?kbid=315273
0
 
Exchange_AdminCommented:
What happens when you use \ instead of /   ?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Sune_StevnsborgCommented:
If the LDAP connector in netdom.exe uses SQL commands you might have to use single quotes ‘ instead of the ordinary double quotes “
0
 
Marketing_InsistsAuthor Commented:
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.
0
 
oBdACommented:
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.
Dsmove
http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/dsmove.asp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now