The dsmove command is a Windows Command Prompt utility that allows you to move objects from one location to another in Active Directory. It is used to move objects such as users, groups, computers, and organizational units (OUs). The dsmove command is part of the Windows Server 2003 Resource Kit Tools and is available for use in Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, and Windows Server 2003, 2008, 2012, and 2016.

Syntax of the dsmove Command

The syntax of the dsmove command is as follows:

  • dsmove

Theargument is the distinguished name of the object to be moved. The argument is the distinguished name of the container or OU to which the object is to be moved.

Options of the dsmove Command

The dsmove command has several options that can be used to modify the behavior of the command. These options are as follows:

  • -f: Forces the move operation even if the destination already exists.
  • -s: Specifies the source of the move operation.
  • -t: Specifies the target of the move operation.
  • -c: Specifies the container or OU to which the object is to be moved.
  • -q: Suppresses all output.

Examples of the dsmove Command

The following are examples of how to use the dsmove command:

  • To move a user from one OU to another, use the following command: dsmove “CN=John Doe,OU=Users,DC=example,DC=com” “OU=Managers,DC=example,DC=com”
  • To move a computer from one OU to another, use the following command: dsmove “CN=MyComputer,OU=Computers,DC=example,DC=com” “OU=Servers,DC=example,DC=com”
  • To move an OU from one OU to another, use the following command: dsmove “OU=Sales,DC=example,DC=com” “OU=Departments,DC=example,DC=com”

Conclusion

The dsmove command is a useful Windows Command Prompt utility that can be used to move objects from one location to another in Active Directory. It is a simple command to use and has several options that can be used to modify its behavior. With the dsmove command, you can easily move users, groups, computers, and OUs from one OU to another.

Leave a Reply