Tuesday, September 6, 2011

Managing AD objects

3 Ways to Move AD Objects
1. Open ADUC and drag and drop object
2. Context Menu - right click
3. DSMove - Command line

To move user tunger from the users container to the sales users ou under corp users ou here is the command
dsmove "cn=tunger,cn=users,dc=tonyunger,dc=com" -newparent "ou=sales users,ou=corp users,dc=tonyunger,dc=com"

3 Ways to Delete Objects
1. Highlight object and hit delete button on keyboard
2. context Menu - right click and choose delete
3. DSRM - command line

Delete User:
DSRM "cn=tunger,cn=users,dc=tonyunger,dc=com"
Delete OU:

Remove an ou named sales users and all objects under the ou
DSRM -subtree - nopromp -c "ou=sales users,ou=corp users,dc=tonyunger,dc=com"
To remove all objects under an OU named sales, but leave the ou intact
DSRM - subtree -exclude -noprompt -c "ou=sales users,ou=corp users,dc=tonyunger,dc=com"

Add a user
dsadd user "cn=tunger,cn=users,dc=tonyunger,dc=com" -fn Tony -ln Unger -pwd 1234 -mustchpwd yes

No comments:

Post a Comment