DSMOVE.exe – Windows CMD Command
Rename or Move an active directory object (user, computer, group..) to a different Organisational Unit (OU).
Syntax
DSMOVE ObjectDN [-newname NewRDN] [-newparent ParentDN]
[{-s Server | -d Domain}]
[-u UserName] [-p {Password | *}]
[-q] [{-uc | -uco | -uci}]
Options
ObjectDN Distinguished name of the computer that you want to add.
If omitted will be taken from standard input (stdin)
-newname Rename the object with a new Relative Distinguished Name.
-newparent New location for the object, enter the new parent DN.
-q Quiet, suppress all output
-uc Unicode format
-uco Unicode format for output only
-uci Unicode format for input only
-u UserName The user name with which a user logs on to a remote server.
By default, the currently logged on user.
-p Password The password, or * to prompt for a password.
By default, DSMOVE connects the computer to the domain controller in the logon domain.
For any DS command, you can enter multiple values separated by spaces.
e.g. to modify several user accounts at once just supply a list of the distinguished names separated with spaces.
Examples
Rename a user:
C:\> set _andy="CN=Andrew Gorden,OU=Europe,DC=F4T,DC=Com"
C:\> dsmove %_andy% -newname "Andrew Gordon"
Move a user to a different OU
C:\> set _andy="CN=Andrew Gordon,OU=Europe,DC=F4T,DC=Com"
C:\> set _newOrgUnit="OU=Asia,DC=F4T,DC=Com"
C:\> dsmove %_andy% -newparent %_newOrgUnit%
Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.
very good post