Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 XXXX@mycompany.com -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
add comment

2 Answers

Perhaps experiment with the PowerShell option, New-ADUser

New-ADUser GlenJohn -Type iNetOrgPerson -Path "DC=AppNC" -server lds.Fabrikam.com

Or

New-ADUser GlenJohn -OtherAttributes @{title="director";mail="glenjohn@fabrikam.com"}

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
add comment

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 jimjim@contoso.com -FirstName Jim -LastName Jim
share|improve this answer
add comment

Your Answer

 
discard

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.