Using dsmove its very easy to rename computer accounts/user accounts in the active directory.

EX

dsmove “CN=darshana,OU=Users,OU=hr,dc=mydomain,dc=local” –newname “darshanasam”

In this example im renaming user account which is locate in the users child ou under hr parent ou.

dsmove user rename

dsmove user rename2

Using dsquery administrators can easily query user account or computer account in the active directory.

dsquery user –name *

using this command we can get all the user accounts in the active directory.

dsquery users1

dsquery user –name d*

Using this command we can get the all the users those names are starting with letter “D”.

dsquery1

 

 

dsquery computer –name *

Using this command we can get all the names of the computer accounts in the domain.

dsquery computer1

dsquery user –name * | dsmod user –pwd admin@1234

using this command we can easily change the passwords of the all users to one password. According to the this example password will be change in to the admin@1234

reset all users password from dsmod

dsrm “CN=lakmal manoj,ou=users,ou=hr,dc=mydomain,dc=local” –noprompt

Using this command we can delete user/computer accounts easily.If we use this command without –noprompt parameter user will prompt for the confirm of the deletion.

dsrm remove user with no prompt

Advertisements