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.