Share via


Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2008

Moves a single object, within a domain, from its current location in the directory to a new location, or renames a single object without moving it in the directory tree.

Dsmove is a command-line tool that is built into Windows Server 2008. It is available if you have the Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS) server role installed. To use dsmove, you must run the dsmove command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

For examples of how to use this command, see Examples.


dsmove <ObjectDN> [-newname <NewRDN>] [-newparent <ParentDN>] [{-s <Server> | -d <Domain>}] [-u <UserName>] [-p {<Password> | *}] [-q] [{-uc | -uco | -uci}]


Parameter Description


Required. Specifies the distinguished name of the object that you want to move or rename. If the value is omitted, it is obtained through standard input (stdin) to support piping of output from another command to input of this command.

-newname <NewRDN>

Renames the object that you specify with a new relative distinguished name.

-newparent <ParentDN>

Specifies a new location for the object that you want to move. To specify the new location, you supply the distinguished name of the object's new parent.

{-s <Server> | -d <Domain>}

Connects a computer to a remote server or domain that you specify. By default, dsmove connects the computer to the domain controller in the logon domain.

-u <UserName>

Specifies the user name with which the user logs on to a remote server. By default, -u uses the user name with which the user logged on. You can use any of the following formats to specify a user name:

  • user name (for example, Linda)

  • domain\user name (for example, widgets\Linda)

  • user principal name (UPN) (for example,

-p {<Password> | *}

Specifies to use a password or an asterisk (*) to log on to a remote server. If you type *, dsmove prompts you for a password.


Suppresses all output to standard output (quiet mode).

{-uc | -uco | -uci}

Specifies that dsmove formats output or input data in Unicode. The following list explains each format.

  • -uc: Specifies a Unicode format for input from or output to a pipe (|).

  • -uco : Specifies a Unicode format for output to a pipe (|) or a file.

  • -uci: Specifies a Unicode format for input from a pipe (|) or a file.


Displays help at the command prompt.


  • If a value that you supply contains spaces, use quotation marks around the text, for example, "CN=Mike Danseglio,CN=Users,DC=Contoso,DC=Com".

  • If you supply multiple values for a parameter, use spaces to separate the values, for example, a list of distinguished names.


To rename a user object from Kim Akers to Kim Ralls, type:

dsmove "CN=Kim Akers,OU=Sales,DC=Contoso,DC=Com" -newname "Kim Ralls"

To move the user object for Kim Akers from the Sales organization to the Marketing organization, type:

dsmove "CN=Kim Akers,OU=Sales,DC=Contoso,DC=Com" -newparent OU=Marketing,DC=Contoso,DC=Com

To combine the rename and move operations, type:

dsmove "CN=Kim Akers,OU=Sales,DC=Contoso,DC=Com" -newparent OU=Marketing,DC=Contoso,DC=Com -newname "Kim Ralls"

Additional references

Command-Line Syntax Key