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 can to add a user in a Root-OU with dsadd command-line.But,I can't to add to in a Sub-OU. How can I add a user to a Sub-OU with dsadd command-line?

Here is my command-line.

dsadd user "cn=XXXX,ou=TEST,dc=mycompany,dc=com"  -upn -fn XXXX -ln     YYYY 
-display XXXXYYYY -pwd 1234567 -desc "IT PERSONAL"  -mustchpwd yes 

Thanks in advance.

share|improve this question
what error are you getting? – Jordan W. Feb 15 '11 at 18:15
I'm not getting an error. – Cell-o Feb 15 '11 at 18:33
Any Suggestions? – Cell-o Feb 19 '11 at 17:52
What are the results of running the command you have above? Does it create the user in the root or in the test ou? – uSlackr Jun 17 '11 at 16:31

Perhaps experiment with the PowerShell option, New-ADUser

New-ADUser GlenJohn -Type iNetOrgPerson -Path "DC=AppNC" -server


New-ADUser GlenJohn -OtherAttributes @{title="director";mail=""}

it has a -Path parameter which allows you to set the parent OU like so:

 -Path "ou=mfg,dc=noam,dc=corp,dc=contoso,dc=com"
share|improve this answer
First of all,thanks so much.But,How can I do with dsadd command-line? – Cell-o Feb 15 '11 at 17:36

Another nice tool using PowerShell is the Quest AD commandlets here. It lets you set the OU using -ParentContainer and has tons of other functionality as well.

new-qaduser -ParentContainer "ou=sales,dc=contoso,dc=com" -UserPrincipalName -FirstName Jim -LastName Jim
share|improve this answer

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.