lucifer82
asked on
How to user dsadd to add user into OU under OU
I have a structure in my AD that there is OU under OU and I want to create user in there how do I code it?
I can add user if it's just OU=The OU1 but if I put just "OU=The OU2" or both like below it comes back saying that directory cannot be found.
Any ideas??
Thank you
I can add user if it's just OU=The OU1 but if I put just "OU=The OU2" or both like below it comes back saying that directory cannot be found.
Any ideas??
Thank you
dsadd user "CN=Test DSADD,OU=The OU1,OU=The OU2,DC=testing,DC=domain,DC=internal" -samid testdsadd
t -fn test -ln dsadd -display testdsmodd
Actually sorry the qoutes should take care of that.
Make sure the full path of the OU is correct.
Looking at the OU path, this is a child domain?
DC=testing,DC=domain,DC=in ternal
zf
Make sure the full path of the OU is correct.
Looking at the OU path, this is a child domain?
DC=testing,DC=domain,DC=in
zf
If DC=testing is your servers name it dosnt belong in the path.
zf
zf
ASKER
Yes there is this OU name under testing.domain.internal -> This OU1 -> This OU2 and I want to create user in there.
"This OU2 and I want to create user in there."
Umm if you want the user in OU 2 it should be on the end the ou the user goes in is closet to the user
test
ou1
ou2
testing
domain
internal
assuming your ou tree structure Is as listed above
In ou1 like this
dsadd user "CN=Test DSADD OU=The OU1,OU=The OU2,DC=testing,DC=domain,D C=internal " -samid testdsadd
In ou2 like this
dsadd user "CN=Test DSADD OU=The OU2,DC=testing,DC=domain,D C=internal " -samid testdsadd
Is this how your OU Is structure And are you trying To put the user In ou1 Or ou2
zf
Umm if you want the user in OU 2 it should be on the end the ou the user goes in is closet to the user
test
ou1
ou2
testing
domain
internal
assuming your ou tree structure Is as listed above
In ou1 like this
dsadd user "CN=Test DSADD OU=The OU1,OU=The OU2,DC=testing,DC=domain,D
In ou2 like this
dsadd user "CN=Test DSADD OU=The OU2,DC=testing,DC=domain,D
Is this how your OU Is structure And are you trying To put the user In ou1 Or ou2
zf
Why do I have the feeling that OU1 and OU2 are inside DSADD OU
make sure your command follows your OU path exactly in reverse order (most specfic to least specific)
zf
make sure your command follows your OU path exactly in reverse order (most specfic to least specific)
zf
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
well the tree is
testing.domain.internal
This OU1
This OU2
testing.domain.internal
This OU1
This OU2
ASKER
Thank you when I put the OU2 in before OU1 it worked
Glad to here it, I kinda thought the ou's tree order was off but as I cant see it didnt know for sure.
Glad you got it working.
Thanks for the points.
zf
Glad you got it working.
Thanks for the points.
zf
http://www.computerperformance.co.uk/Logon/DSadd_add_group.htm
Note 1: dsadd ou. This command tells Active Directory which object to create, in this case an OU (not a user).
Note 2: You only really need speech marks if there is a space in any of your names. So ou=guyds, dc=cp, dc=com would work fine, but ou=GUY Space DS, dc=cp, dc=com fails because of the spaces in the GUY Space DS, name. In this second example you must type: "ou=GUY Space DS, dc=cp, dc=com"
zf