Recipe5.6.Moving Mailboxes


Recipe 5.6. Moving Mailboxes

Problem

You have mailboxes on one server and need to move them to another.

Solution

Using a graphical user interface

For Exchange Server 2003:

  1. Log on to any machine in your domain that has the Exchange management tools installed.

  2. Open the ADUC snap-in (Users and Computers.msc).

  3. Locate the container that holds the mailbox you want to move.

  4. Select the mailboxes you want to move, then right-click any one of them and choose the Exchange Tasks command.

  5. The Exchange Task Wizard will appear. (You may see a welcome page first; if so, click Next to dismiss it.)

  6. From the Available Tasks window, choose Move Mailbox and click Next.

  7. The Move Mailbox page will appear, showing the server where the target mailbox is currently stored.

  8. Choose the target mailbox server from the Server drop-down listing; it will list only those servers that you can move the mailbox to. For example, if you have front-end servers, they won't appear in the drop-down listing even if they have mailbox stores.

  9. Choose the mailbox database that you want to hold the mailboxes; the contents of the Mailbox Store database will change to reflect available databases on the selected server.

  10. Click Next and then click Finish.

  11. Wait while the mailboxes are moved.

Using a command-line interface

The -move switch allows you to specify a target location for the specified mailbox:

> exchmbx -b <userDN> -move <server>:<storageGroup>:<mailboxDatabase>

You specify <server> as a NetBIOS or FQDN; the <storageGroup> and <mailboxDatabase> values must match the server's names exactly.

Using VBScript
' This code moves the target mailbox to the specified server.  ' ------ SCRIPT CONFIGURATION ------  strServerName = "<ServerName>"    ' e.g., CONT-EXBE01  strUser= "<UserName>"         ' e.g., "Paul Robichaux"   strDomain= "<domainPath>"        ' e.g., "dc=robichaux, dc=net"  strTargetName = "/CN=mdbName,CN=sgName, CN=Information Store,"  strServerContainer = ",CN=servers,cn=<adminGroup>," &_      "CN=administrative groups,cn=<orgName>,cn=" &_      "Microsoft Exchange,cn=Services,cn=configuration," & strDomain  ' e.g., strServerContainer = ",CN=servers,cn=First Administrative Group," &_      "CN=administrative groups,cn=Robichaux and Associates,cn=" &_      "Microsoft Exchange,cn=Services,cn=configuration," & strDomain ' ------ END CONFIGURATION --------- ' get the target user object  what = "LDAP://" & strServerName & "/CN=" & strUser &_     ",CN=users," & strDomain Set objUser = GetObject(what) Set objMailbox = objUser strTargetMDB = "LDAP://" + strServerName + strTargetName strTargetMDB = strTargetMDB + "CN=" & strServerName &_   strServerContainer objMailbox.MoveMailbox strTargetMDB objUser.SetInfo WScript.Echo "Mailbox for " & strUser & " moved to " & strTargetName

Discussion

The process of moving mailboxes is largely the same for Exchange 2000 and Exchange Server 2003. However, the Exchange Server 2003 version of the mailbox mover includes two welcome improvements:

  • It's multithreaded, so it takes better advantage of multiprocessor (or hyperthreaded) machines. By default, the mailbox mover will start four concurrent threads. You can move mailboxes from multiple machines, as long as you don't try to move the same mailbox on more than one machine at a time. For example, you could use workstation A to start a move of all mailboxes in database 1 on server 1 to server 2, then kick off a concurrent session on workstation B to move mailboxes from database 2 on server 1.

  • With Exchange Server 2003 SP1 and later, it understands how to move mailboxes between different administrative groups and Exchange 5.5 sites. This cross-site functionality is extremely important for Exchange 5.5 migrations, since without it you'd either have to replace each Exchange 5.5 site with an Exchange 2000 or Exchange Server 2003 administrative group or use a third-party migration tool.

Before you can move mailboxes across sites in a mixed 5.5/2000/2003 environment, there are some prerequisite steps you must fulfill:

  1. Install the hotfix described in MS KB 836489 on all of your Exchange 5.5 servers. The fix makes some minor changes to the directory structure, so allow time for directory propagation before you try to move anything.

  2. Upgrade all instances of the ADC in your organization to the version included with Exchange Server 2003 SP1 or later.

  3. Ensure that the Site Replication Service (SRS) is correctly replicating, and receiving, changes in site topology.

The script for this recipe is distinguished largely by the long, ugly set of strings necessary to specify correctly which mailbox DB is to be used. It is necessary to specify the full path to the target MDB, but you don't have to specify anything about the source mailbox other than the DN of the user.

See Also

MS KB 836489 (an update is required for mixed-mode site consolidation with Exchange Server 5.5)



Exchange Server Cookbook
Exchange Server Cookbook: For Exchange Server 2003 and Exchange 2000 Server
ISBN: 0596007175
EAN: 2147483647
Year: 2006
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net