Compartir a través de


Movetree Examples

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

MoveTree Examples

These examples assume the following scenario:

In the Marketing domain, there is a Server1 server and a Promotions organizational unit. In the Sales domain, there is a Server2 server. You want to move the Promotions organizational unit from the Marketing domain to the Sales domain, and to rename the new organizational unit Sales Promotions.

Example 1: Perform a Test MoveTree Operation

You want to move the Promotions organizational unit from the Marketing domain to the Sales domain and to rename the Promotions organizational unit Sales Promotions. To do a test run, and only perform the move if the test executes without errors, type the following at the command line:

movetree /start /s server1.marketing.microsoft.com /d server2.sales.microsoft.com/sdn OU=Promotions,DC=Marketing,DC=Microsoft,DC=Com /ddn OU=Sales Promotions,DC=Sales,DC=Microsoft,DC=Com

Example 2: Move Tree Without Test

To move the Promotions organizational unit from the Marketing domain to the Sales domain and then rename the Promotions organizational unit to Sales Promotions without doing a test run first, type the following at the command line:

movetree /startnocheck /s server1.marketing.microsoft.com /d server2.sales.microsoft.com /sdn OU=Promotions,DC=Sales,DC=Microsoft,DC=Com /ddn OU=Sales Promotions,DC=Sales,DC=Microsoft,DC=Com

Example 3: Resume a Failed MoveTree Operation

A previous MoveTree operation between Server1 in the Marketing domain and Server2 in the Sales domain failed while the objects were being moved into the Sales Promotion organizational unit. To resume the failed operation, type the following at the command line:

movetree /continue /s server1.marketing.microsoft.com /d server2.sales.microsoft.com /ddn OU=Sales Promotions,DC=Sales,DC=Microsoft,DC=Com

Example 4: Test a MoveTree Operation

Eventually you want to move the Promotions organizational unit from the Marketing domain to the Sales domain, renaming it Sales Promotions. To do a test run and get verbose output to study before you perform the actual move, using the credentials Microsoft\administrator with the password "********", type the following at the command line:

movetree /check /s server1.marketing.microsoft.com /d server2.sales.microsoft.com /sdn OU=Promotions,DC=Sales,DC=Microsoft,DC=Com /ddn OU=Sales Promotions,DC=Sales,DC=Microsoft,DC=Com /verbose /u Microsoft\administrator /p ********

Example 5: Use MoveTree in a Batch File

You want to move the Promotions organizational unit from the Marketing domain to the Sales domain and rename the Promotions organizational unit Sales Promotions. To use a batch file to do a test run, and only perform the move if the test executes without errors, create a batch file with the following content:

movetree /check
 /s server1.marketing.microsoft.com
 /d server2.sales.microsoft.com
 /sdn OU=Promotions,DC=Marketing,DC=Microsoft,DC=Com
 /ddn OU=Sales Promotions,DC=Sales,DC=Microsoft,DC=Com
if errorlevel 0 goto start
goto exit
:start
movetree /start
 /s server1.marketing.microsoft.com
 /d server2.sales.microsoft.com
 /sdn OU=Promotions,DC=Marketing,DC=Microsoft,DC=Com
 /ddn OU=Sales Promotions ,DC=Sales,DC=Microsoft,DC=Com
:exit

For more information about errors in MoveTree, see Movetree Remarks in MoveTree Remarks.

See Also

Concepts

Movetree.exe
Movetree Remarks
Movetree Syntax
Alphabetical List of Tools
Search Overview
Replmon Overview
Repadmin Overview
Ldp Overview
Dsastat Overview
Clonepr Overview
ADSI Edit (adsiedit.msc)
Acldiag Overview
Spcheck Overview
Nltest Overview
Netdom Overview
Netdiag Overview
Netcap Overview
Httpcfg Overview
Dnslint Overview
Dnscmd Overview
Dhcploc Overview
Dcdiag Overview
Browstat Overview