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


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 ObjectDN [-newname NewName] [-newparent ParentDN] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-q] [{-uc | -uco | -uci}]

  • ObjectDN
    Required. Specifies the distinguished name of the object 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 with a new relative distinguished name.
  • -newparent ParentDN
    Specifies the new location to which you want to move the object. The new location is specified as the distinguished name of the new parent node.
  • {-s Server | -d Domain}
    Connects to a specified remote server or domain. By default, the computer is connected 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, Linda@widgets.microsoft.com)

  • -p {Password | *}
    Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password.
  • -q
    Suppresses all output to standard output (quiet mode).
  • {-uc | -uco | -uci}
    Specifies that output or input data is formatted in Unicode. The following table lists and describes each format.

    Value Description


    Specifies a Unicode format for input from or output to a pipe (|).


    Specifies a Unicode format for output to a pipe (|) or a file.


    Specifies a Unicode format for input from a pipe (|) or a file.

  • /?
    Displays help at the command prompt.
  • To move an object across domains, see the Movetree command-line tool in Install Windows Support Tools.

  • If a value that you supply contains spaces, use quotation marks around the text (for example, "CN=Mike Danseglio,CN=Users,DC=Microsoft,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=Microsoft,DC=Com" -newname "Kim Ralls"

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

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

To combine the rename and move operations, type:

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

Formatting legend

Format Meaning


Information that the user must supply


Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also


Directory service command-line tools
Command-line reference A-Z
Command shell overview