Active Directory Migrations: Mailbox Moves 2.0

If you’ve been following along with the process you’ll know I already covered mailbox moves. So you’re probably wondering what this post is about.

“Well, Jason,” you’re probably saying, “your process is nice enough and really saved me from having to write a lot of code, but what do I do for this users with huge mailboxes? Like, I have a few execs with 10GB mailboxes. I know I was never supposed to allow that, but, you know, they’re execs. And I have a tiny migration window.”

I’m glad you asked.

I found a nifty little switch on the mailbox move called “suspendwhenreadytocomplete”. Essentially what it does is kick off a mailbox move of a user into a temporary staging area (i.e you still have mailflow” and then when it gets to 95% it just stops. You could conceivably leave it there forever. Or days. Either one. The idea here is that that last 5% is the remaining mail items (and the changes) and then it flips the switch from MEU to mailbox and puts the mail attributes on the account in the target domain. Since I saw an average of about 20 minutes per 1GB of a mailbox during moves, I could work backward to see how much time it would take to move that mailbox and was able to kick it off early.

A couple huge caveats with this:

1. Only works from Exchange 2007 or 2010 to Exchange 2010.
2. You canNOT have Unified Messaging turned on for the user in the source domain when you start. Same as for a mailbox move. What this means is that the users won’t have voicemail until they’re actually migrated. There are ways around this using alternate names on your UM policy, but that didn’t work for us based on how we were changing things up.

Here’s the script. This helped me tremendously for my migrations:

##since this is a oneoff, specify the email address we're doing this to.
##call include file

. .\params.ps1

##Create Sessions
$ExchSession=New-PSSession -ConfigurationName Microsoft.Exchange -connectionuri $ExchURI -credential $LocalCredentials
##import the session
import-pssession $ExchSession|out-null
## Do a move request for each mailbox
##note the last option -suspendwhenreadytocomplete

New-MoveRequest -Identity $smtp -domaincontroller $TargetDC -RemoteLegacy -RemoteGlobalCatalog $SourceDC -RemoteCredential $RemoteCredentials -TargetDeliveryDomain $TargetDeliveryDomain -baditemlimit 50 -suspendwhenreadytocomplete

##clean uup
remove-pssession $ExchSession

That’s it. Then when you’re ready to go on with your migration just go into the Exchange console to the move requests section and right-click and select “Complete Move Request”


Leave a Reply

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

You are commenting using your 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