0

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.

4
  • what error are you getting?
    – Jordan W.
    Feb 15, 2011 at 18:15
  • I'm not getting an error.
    – Cell-o
    Feb 15, 2011 at 18:33
  • Any Suggestions?
    – Cell-o
    Feb 19, 2011 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, 2011 at 16:31

2 Answers 2

1

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"
1
  • First of all,thanks so much.But,How can I do with dsadd command-line?
    – Cell-o
    Feb 15, 2011 at 17:36
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.