Moving a Mailbox

Mailbox moves are commonly done in many Exchange organizations due to servers getting upgraded, server hardware issues, users migrating from Exchange 5.5 to Exchange 2003, or the administrators wanting to readjust mailbox location for load balancing.

More...

A mailbox move is an odd operation in terms of permissions. Logically, moving a mailbox is basically a combination of create and delete operations, which is something an Exchange Data Administrator can do just fine. However, to actually move a mailbox, you must have Exchange Administrator Role permissions with a subset of the permissions Exchange Data Administrator have on users. See MS KB 842033 for details of the permissions needed.

If you don’t handle user mailbox administration through an automated web site, I recommend that you delegate permissions to the attributes listed in the knowledge base articles to some Active Directory group. Once delegated, add the Exchange Administrator Role users to that group and have them handle all mailbox moves.

Using a graphical user interface

  1. Open the ADUC snap-in.
  2. This needs to be run on a workstation or server that has the Exchange Management Tools loaded.
  3. If you need to change domains, right-click on Active Directory Users and Computers in the left pane, select Connect to Domain, enter the domain name, and click OK.
  4. In the left pane, browse to the parent container of the user, right-click on the user, and select Exchange Tasks.
  5. On the Welcome screen, click Next.
  6. Select Move Mailbox and click Next.
  7. Select new values for Server and Mailbox Store and click Next.
  8. Select how you want to handle corrupted messages and click Next.
  9. Specify when to start processing the move task and click Next.
  10. When the Completed screen is shown, click Finish. If there are errors, select the View Detailed Report checkbox to get a failure report.

Using a command-line interface

> exchmbx -b <UserDN> -move"<server>:<storage group>:<mail store>"

Or alternatively, run the following command:

> exchmbx -b <UserDN> -move"<Home MDB URL>"

Replace <UserDN> with the user’s distinguished name, <server> with the Exchange server name, <storage group> with the storage group, <mail store> with the mail store, and <Home MDB URL> with the full homeMDB URL for the desired mailbox store.

To move an existing mailbox for user joe to Exchange Server Srv1, Storage group SG1, and mailbox store DB1, execute the following command:

> exchmbx -b "cn=joe,cn=users,dc=rallencorp,dc=com"-move "srv1:sg1:db1"

Using VBScript

 

' This code moves a mailbox.

' ------ SCRIPT CONFIGURATION ------

strUserDN = "<UserDN>" ' e.g., cn=jsmith,cn=Users,dc=rallencorp,dc=com

strServer = "<Exchange Server>" ' e.g., ExchServer2

strSGName = "<Storage Group Name>" ' e.g., SG1

strMailStoreName = "<MailBox Store Name>" ' e.g., DB1

' ------ END CONFIGURATION ---------

' Find Storage Group URL and Generate Mailbox Store URL

strSearch = "cn=" & strSGName & ","

set objSrv = CreateObject("CDOEXM.ExchangeServer")

objSrv.DataSource.Open strServer

for each strSg in objSrv.StorageGroups

  if (instr(1,strSg,strSearch,1)>0) then

  strSGUrl = strSg

  exit for

  end if

next

strMBUrl = "LDAP://cn=" & strMailStoreName & "," & strSGUrl' Attach to user and move mailbox

set objUser = GetObject("LDAP://" & strUserDN)

objUser.MoveMailbox(strMBUrl)

Wscript.Echo "Successfully moved mailbox."