Project Coconut Entries:

Now that the Exchange server is installed and configured it is time to migrate the mailboxes. You can take a look at the existing mailboxes in the Exchange organisation using the Exchange Management Console or using the Get-Mailbox cmdlet in the Exchange Management Shell.

mailboxmigration003

[PS] C:\>Get-Mailbox

Name                      Alias                ServerName       ProhibitSendQuo
                                                                ta
----                      -----                ----------       ---------------
Administrator             Administrator        labex1           unlimited
User1                     User1                labex1           unlimited
User2                     User2                labex1           unlimited
User3                     User3                labex1           unlimited
User4                     User4                labex1           unlimited
John Adams                johnadams            labex1           unlimited
Paul Anderson             paulanderson         labex1           unlimited
Gary Billups              garybillups          labex1           unlimited
Frank Curtin              frankcurtin          labex1           unlimited
Harry Kindle              harrykindle          labex1           unlimited
Carl Munro                carl munro           labex1           unlimited
WARNING: Object lab.internal/Lab Corp/Users/Carl Munro has been corrupted and
it is in an inconsistent state. The following validation errors have occurred:
WARNING: "carl munro" is not valid for Alias. Valid values are: Strings formed
with characters from a to z (uppercase or lowercase), digits from 0 to 9, !, #,
 $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, } or ~. One or more periods may
be embedded in an alias, but each one of them should be preceded and followed
by at least one of the other characters. Unicode characters from U+00A1 to
U+00FF are also valid in an alias, but they will be mapped to a best-fit
US-ASCII string in the email address which is generated from such an alias.

The first thing you might notice is the warning about an invalid alias on one of the mailbox users. The EMC and EMS will warn you of any such problems with mailboxes and you should take steps to fix them before you attempt the mailbox migration. With just one invalid alias it is easy to fix, but if you have dozens or even hundreds of them you’ll need some scripting assistance. Fortunately the Microsoft Exchange Team has come up with a script to make this easy.

Consider Transaction Logging

Bulk mailbox migrations generate a lot of transaction logging on the target server, as each mailbox item moved is a line in a log file. This can cause disk space problems on even very large capacity volumes, which is a problem you definitely want to avoid as running out of disk space will cause the databases in that storage group to dismount.

There are two approaches you can take to work around this:

  • use circular logging during the mailbox migrations (not recommended)
  • migrate the mailboxes in smaller batches and use backups to truncate the resulting log files (recommended)

I generally recommend the second approach as circular logging carries some risks. By migrating the mailboxes in smaller batches you allow your support staff to better handle any unforeseen problems that arise because they will only affect smaller numbers of users. It also makes the migrations easier to schedule in limited non-business hours. And finally it encourages a post-migration backup of the database which is just a plain good idea. In real life I tend to aim for a 2-3 hour window for mailbox moves in the evening and then launch a backup and go to sleep.

How to Migrate in Batches

The Exchange Management Console makes it very simple to migrate users in batches by simply using filters to limit your view of mailboxes to just those you wish to migrate. For example, if I planned on migrating all users with surnames starting with “A” I could apply such a filter easily.

mailboxmigration002

Similarly I could plan to move users according to which Mailbox Database they are on, and filter on that criteria.

mailboxmigration004

You can also use the Exchange Management Shell to move users who match certain criteria. To move all users with surnames starting with “A” using the Exchange Management Shell I can pipe a Get-User query into the Move-Mailbox cmdlet.

[PS] C:\>Get-User | where {$_.RecipientType -eq "UserMailbox" -and $_.LastName -
like "A*"} | Move-Mailbox -TargetDatabase "Mailbox Database" -Confirm:$false

Using -Confirm:$false ensures that I am not prompted for each mailbox move.

mailboxmigration005

In the next part of Project Coconut I’ll discuss some of the post-migration issues you may encounter, and go through the process of removing the legacy Exchange servers from the organisation.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

Leave a Reply