Moving mailboxes from Exchange 2010 to Exchange 2003

During a recent migration for a customer we needed to move some mailboxes back to their legacy Exchange 2003 servers for various reasons.  In order to do so, we needed to run a series of PowerShell scripts as the EMC does not allow for these moves.  Microsoft has provided a good article on what to do before moving the mailboxes to Exchange 2003 [ http://technet.microsoft.com/en-us/library/dd638157.aspx ].  Here are the steps per the article:

 Moving mailboxes from Microsoft Exchange Server 2010 to Exchange Server 2003? Consider the following:

 • The move process is performed offline, and end-users won’t be able to access their mailboxes during the move.

• Perform the move from the server running Exchange 2010 by using the move request cmdlets in the Exchange Management Shell. You can’t use Exchange System Manager on an Exchange 2003 server to move the mailboxes.

• If you’re moving a mailbox that has a personal archive associated with it, you must disable the archive before moving the mailbox. For details, see Disable a Personal (On-Premises) or Cloud-Based Archive for a Mailbox.

• If you’re moving a mailbox to Exchange 2003, you must disable single-item recovery and purge the Recoverable Items folder. For details, see Clean Up the Recoverable Items Folder.

The first step is to disable the Personal Archive.  This means that the user will be unable to use the archive mailbox until their main mailbox is migrated back to Exchange 2010.  The good thing is that the archive mailbox will not be removed as long as the mailbox retention period for  the database that the mailbox is present on.  The default period is 30 days.  To disable the archive, you just need to know the mailbox alias and plug that in to this PowerShell command – Disable-Mailbox -Identity <mailbox alias> -Archive  

SAMPLE

Disable-Mailbox -Identity <mailbox alias> -Archive    

Confirm  Are you sure you want to perform this action?  Disabling the archive for <mailbox alias> will remove the archive for this user and mark it in the database for removal.  [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is “Y”): a

Once the archive mailbox is disabled, you need to see if Single Item Recovery is enabled for the user.  To do this simply run – get-mailbox  <mailbox alias> |ft displayname,singleitemrecoveryenabled

 SAMPLE    

get-mailbox <mailbox alias> |ft displayname,singleitemrecoveryenabled    

DisplayName                            SingleItemRecoveryEnabled

———–                                    ————————-  

<Mailbox Alias>                       False  

If SingleItemRecoveryEnabled is ‘True’, this can be disabled with – set-mailbox <mailbox alias> -SingleItemRecoveryEnabled $False

Next you need to check if the mailbox has any items in the Retention Items  in Exchange 2010 [ http://technet.microsoft.com/en-us/library/ee364752.aspx ].   To do this, we need to search the mailbox for this folder and its content.  You will need the Discovery Role in Exchange 2010.  To add yourself to the role run this in PowerShell – Add-RoleGroupMember -Identity “Discovery Management” -Member <your admin account> .  Once you have the role assigned to your admin account, you can query the users folder for these items using – Search-Mailbox -Identity <mailbox alias> -SearchDumpsterOnly -estimateresultonly

 SAMPLE    

Search-Mailbox -Identity <mailbox alias> -SearchDumpsterOnly -estimateresultonly    

RunspaceId       : dfe688c8-d4be-42f4-8023-83f0d23b026d

Identity         : <user’s DN>  

TargetMailbox    :  

TargetPSTFile    :  Success          :

True  TargetFolder     :  

ResultItemsCount : 1533  

ResultItemsSize  : 67.7 MB (70,989,444 bytes)

If the item count and item size are > 0, you will need to clear these out before the mailbox is moved to Exchange 2003.  The command to do so, per Microsoft’s own documentation, is as follows – Search-Mailbox -Identity <mailbox alias> -SearchDumpsterOnly -TargetMailbox “Discovery Search Mailbox” -TargetFolder “<mailbox alias>-RecoverableItems” -DeleteContent

 SAMPLE    

Search-Mailbox -Identity <mailbox alias> -SearchDumpsterOnly -TargetMailbox “Discovery Search Mailbox” -TargetFolder “<mailbox alias>-RecoverableItems” -DeleteContent    

Confirm  Deleting content from mailboxes bsmith  [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is “Y”): a      

RunspaceId       : dfe688c8-d4be-42f4-8023-83f0d23b026d  

Identity         : <user’s DN>  

TargetMailbox    : <Discover Search Mailbox’s DN>  

TargetPSTFile    :  

Success          : True  

TargetFolder     : \<mailbox alias>-RecoverableItems\<mailbox alias>-4/3/2012 4:25:30 PM  

ResultItemsCount : 1533  

ResultItemsSize  : 67.7 MB (70,989,444 bytes)

Now I like to verify if this has truly worked and you can do this by running the first search command we used to see if there were any items in the folder:

 SAMPLE    

Search-Mailbox -Identity <mailbox alias> -SearchDumpsterOnly -estimateresultonly    

RunspaceId       : dfe688c8-d4be-42f4-8023-83f0d23b026d  

Identity         : <user’s DN>  

TargetMailbox    :  

TargetPSTFile    :  

Success          : True  

TargetFolder     :  

ResultItemsCount : 0  

ResultItemsSize  : 0 B (0 bytes)  

Now that this is clean and all the other steps are complete, you can now move the mailbox back to Exchange 2003.

Sample    

new-moverequest -identity rgabuzd -targetdatabase 4717536c-893c-457a-85af-37f19fc9b823

Once the request has been queued you can monitor it from the Exchange Management Console under Recipient Configuration – Move Requests.

In my next article I will discuss how you can reattach those archive mailboxes when the users mailbox is moved back to Exchange 2010.

Advertisements

4 thoughts on “Moving mailboxes from Exchange 2010 to Exchange 2003

  1. Thanks for the useful post bro.
    I have tried it on one of my mailbox in Exchange 2010 and tried to move it back to Exchange 2003 (the mailbox is originally sitting in Exchange 2003 mailstore), but the move-request failed.

    Also, the command that you use on the last part of the move-request:
    new-moverequest -identity rgabuzd -targetdatabase 4717536c-893c-457a-85af-37f19fc9b823

    How can I find the mailstore/database string to use? – 4717536c-893c-457a-85af-37f19fc9b823

    Thanks in advanced bro!

  2. Great Article!

    Just a few comments:
    If you have your Exchange Roles separated, the Search-Mailbox only works on the HT.

    Here is a quick way to get the Exchange 2003 Mailbox GUID (RunSpaceID)

    Get-MailboxDatabase -IncludePreExchange2010 | Select Server, Name, GUID

  3. Dear,
    I tried to move a mailbox back from Exchange 2013 to 2007 cross-forest using the script below.
    Whatever I try, the database name or the database guid, I always get the error that the target database doesn’t exists.
    Any idea?
    Thanks for the feedback.
    Regards.
    Peter

    $Identity=”200702″

    $MailBoxToMove=”$Identity@aaa.local”
    $TempSMTPAddress=”$Identity@bbb2007.local”

    $sourceDomainController=”dc200.aaa.local”
    $targetDomainController=”dc201.bbb.local”
    $TargetDomain=”bbb.local”
    $TargetDatabase=”EX200703\First Storage Group\Mailbox Database”
    $ExchangeScriptsPath=”C:\Program Files\Microsoft\Exchange Server\V15\Scripts”

    Write-Host “Get Exchange Credetials in the Target Forest” -foregroundcolor green
    $LocalCredentials=Get-Credential
    Write-Host “Get Exchange Credetials in the Source Forest” -foregroundcolor green
    $RemoteCredentials=Get-Credential

    cd $ExchangeScriptsPath

    Write-Host “Remove-MoveRequest for mailbox” -foregroundcolor green
    Remove-MoveRequest -identity $Identity -confirm

    #Write-Host “Prepare the Move, Create new Target Contact” -foregroundcolor green
    #.\Prepare-MoveRequest.ps1 -Identity $MailBoxToMove -RemoteForestDomainController $SourceDomainController -RemoteForestCredential $RemoteCredentials -LocalForestDomainController $TargetDomainController -LocalForestCredential $LocalCredentials –disableemailaddresspolicy -LinkedMailUser

    #Write-Host “Add Temp SMTP Address to the Newly created Contact” -foregroundcolor green
    #Set-Mailuser -identity $Identity -EmailAddresses @{add=”$TempSMTPAddress”}

    Write-Host “Move the Mailbox” -foregroundcolor green
    New-MoveRequest -Identity $MailBoxToMove -RemoteLegacy -remoteTargetDatabase “$TargetDatabase” -RemoteGlobalCatalog $targetDomainController -RemoteCredential $RemoteCredentials -TargetDeliveryDomain $TargetDomain

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s