Blog Post

Exchange Team Blog
6 MIN READ

Exchange 2007 migration overview

The_Exchange_Team's avatar
Oct 28, 2006

Introduction

The process of migrating mailbox content between Exchange servers has been greatly improved for Exchange 2007. Differently than previous versions, our tools are now part of the server code and are therefore more integrated and functional.

There are three tasks used for mailbox migration operations:

  • Move-mailbox - Copies or moves an active mailbox (a mailbox which is associated with an AD account; not in an RSG or disconnected) from one Exchange Database to another
  • Export-Mailbox - Copies or moves content from an active mailbox to a folder inside another active mailbox
  • Restore-Mailbox - Recovers content from a RSG mailbox to an active mailbox or copies content from a RSG mailbox to a folder inside an active mailbox

Move-mailbox functionality can be further divided in two main scenarios:

  • Intra-Org (also known as Intra-Forest): Migrations where a mailbox needs to be moved from between databases or servers within one Exchange Organization.
  • Cross-Org (also known as Cross-Forest): Migrations where a mailbox needs to be moved from one Exchange Organization to another. Since there can only be one Exchange Organization per Forest, that means moving the mailbox across two different Forests.

In this post I will go over Intra-Org migrations. I will address Cross-Org and the other tasks in future posts.

Intra-Org Mailbox Moves

The following Exchange Server versions are supported for this kind of move:

Source Server:

  • Exchange 2000 SP3 (or later)
  • Exchange 2003 SP1 (or later)
  • Exchange 2007

Target Server:

  • Exchange 2000 SP3 (or later)
  • Exchange 2003 SP1 (or later)
  • Exchange 2007

Exchange Permission requirements:

Logon account for the user who is running Move-Mailbox needs to be a member of "Exchange Recipient Administrators" and "Exchange Servers" groups for both source and target Server. Permissions for previous Exchange Servers remain the same as they were for Exchange 2003 Migration Wizard.

Scenarios

These are common scenarios associated with Intra-Org move-mailbox moves:

  • Upgrade Exchange Server
    • After installing and configuring Exchange 2007, Administrators will use move-mailbox to migrate all mailboxes from the Exchange 2000/2003 server(s) to the new Exchange 2007 server(s)
  • Load Balance Exchange Servers
    • Administrators can use move-mailbox to migrate mailboxes among any of the existent servers (based on technical characteristics like mailbox size) until server load is optimal
  • Re-Alignment due to organizational or physical location changes
    • Mailbox servers might be organized based on physical location like departments, location or some other similar criteria. Mailboxes can be moved between servers within an Exchange organization by moving mailboxes so that user mailboxes are stored accordingly

New Move Mailbox functionality added for Exchange 2007

Pre-Validation

Move-mailbox will perform a series of checks before actually trying to move the mailbox. This feature saves time by identifying errors right away rather than waiting until they happen during the move process.

Here is a list of current checks we perform:

  • Verify user exists
  • Check source and target credential (done by connecting to the server)
  • Check mailbox size limit against target database
  • Block system mailbox moves
  • Fail if source user does not have a mailbox
  • Test if target database is mounted

Administrators can run the validation directly from the Move-Mailbox cmdlet by using the -ValidateOnly parameter. In addition, validation is always executed before a 'real' move. This means that even when running moves using the Exchange Management Console Move Mailbox Wizard, a pre-validation will be performed and any errors will be reported right away.

New and Improved Logging

Exchange 2007 Move-Mailbox improves on the existing Exchange 2003 logging functionality (event logs and XML report) and adds one new log feature - the troubleshooting log.

Here is a brief overview of the three logging types available:

  • Event logs - Besides logging start and end of migrations, we now log all errors, warnings and any change to AD objects (such as deleting source mailboxes for Cross-org moves, etc). We also use a more intuitive category name ("Move mailbox").
  • Move Mailbox XML Report - This report now provides a lot more information than before: Source and Target Global Catalog and Domain Controller, all options used, total of mailboxes moved (including total of warnings and errors), more data about the mailbox being moved (Size, Primary SMTP, DN, LegacyExchangeDN, Identity) and start and end time both for individual moves and for the overall move action for multiple mailboxes. Administrators can also choose a specific directory and file name for this report by using the parameter -ReportFile. If -ReportFile is not defined, the log will be created in the default location and called move-MailboxHHMMSS.xml.
  • Troubleshooting log - This is a new log for Exchange 2007 that displays detailed information about the move which can help in diagnosing move failures. It contains all the information of the other logs with additional detail like AD search operations, user matching details, delegation processing, etc. This log will be created as move-MailboxHHMMSS.log.

All logs are enabled by default and are saved into this path: <Exchange Install Root>\Logging\MigrationLogs\.

Two interfaces for moving mailboxes

Administrators can choose between running Intra-Org moves from the Exchange Management Console Wizard and using the Move-Mailbox task from the Exchange Management Shell. The console link is available within the Recipient Configuration / Mailbox node on the Actions panel (at least one mailbox needs to be selected in the result pane).

The Move Mailbox Wizard has been redesigned to match the new graphic design of Exchange 2007:

The basic experience for Administrators remains similar:

  • Pick mailboxes to be moved and start the wizard
  • Select target server and database
  • Choose whether move should fail if corrupt messages are found
  • Specify when the mailbox move should occur
  • Confirm move and check the results

Some advanced options are available only when running Move-Mailbox from the Exchange Management Shell:

  • GlobalCatalog: Sets Global Catalog to be used during migration
  • DomainController: Sets the target Domain Catalog to be used during migration
  • MaxThreads: Number of mailboxes to be moved simultaneously (default is 4)
  • ValidateOnly: Only runs validation code; mailbox is not moved
  • ReportFile: Used for changing the directory and/or file name for the XML report
  • IgnoreRuleLimitErrors: Used for migrations from Exchange 2007 to Exchange 2003 servers. This relates to the 32K limit for rules in Exchange 2003, allowing Exchange 2007 mailboxes that exce ed this limit to be moved back to Exchange 2003 successfully. If this option is used the mailbox will be moved without its rules.

Intra-Org move-mailbox task examples

When running move-mailbox from the Exchange Management Shell you can interact with other tasks and create easy, but powerful, one-liners. Here are a few examples:

- Migrate all mailboxes from a legacy database to an Exchange 2007 database:

Get-Mailbox -Database "Exch2003Server1\DB1" | Move-Mailbox -TargetDatabase "Exch2007Server1\Mailbox Database"

Migrate all legacy mailboxes from a database to an Exchange 2007 database:

Get-recipient | where { $_.RecipientTypeDetails -Eq " LegacyMailbox"}|Move-Mailbox -TargetDatabase "Exch2007Server1\Mailbox Database"

Migrate all mailboxes for users whose alias start with the letter A from all databases within a legacy server to an Exchange 2007 database:

Get-Mailbox -Server "Exch2003Server1" | Where {$_.Alias -ilike "A*"} | Move-Mailbox -TargetDatabase "Exch2007Server1\Mailbox Database"

Migrate mailboxes based on Organizational information

Get-User | Where { $_.Department -ilike "Accounting" } | Move-Mailbox -TargetDatabase " Exch2007Server1\Mailbox Database"

Get-Mailbox | Where { $_.OU -ilike "*Marketing" } | Move-Mailbox -TargetDatabase " Exch2007Server1\Mailbox Database"

Get-User | Where { $_.Company -ilike "Microsoft" } | Move-Mailbox -TargetDatabase " Exch2007Server1\Mailbox Database"

Migrate mailboxes based on user's physical location

Get-User | Where { $_.City -ilike "Seattle" } | Move-Mailbox -TargetDatabase " Exch2007Server1\Mailbox Database"

Get-User | Where { $_.PostalCode -Eq "98075" } | Move-Mailbox -TargetDatabase " Exch2007Server1\Mailbox Database"

Get-User | Where { $_.StateOrProvince -ilike "WA" } | Move-Mailbox -TargetDatabase " Exch2007Server1\Mailbox Database"

Migrate mailboxes based on size

Get-MailboxStatistics -Server "Exch2007Server1" | Sort TotalTimeSize -Desc | Select -First 10 |Move-Mailbox -TargetDatabase "Exch2007Server1\Mailbox Database"

- Paul MacKnight

Updated Jul 01, 2019
Version 2.0
  • Is there a way to increase the number of threads used for moving mailboxes in ESM Ex 2003?
  • Will moving a mailbox convert all its mail-messages from MIME to MAPI? Will it destroy all SMTP-emailadresses?

    Many mails in our company have been moved from the old IMAP-server via IMAP into Exchange and therefore are still residing in the STM-file instead of the EDB-file.

    I found Outlook to destroy some interessting data, e.g. the headers of forwarded mails (forward as attachement) or Non-Delivery reports: The latter somtimes contain parts of the original message (interessting in fighting spam!), but I occasionally was not able to get the original back once it was horrified(converted) from the cool MIME to the lame MAPI. :-(
  • Yev,
    There is no supported way to change the number of threads for moving mailboxes in Exchange 2003.
  • Christian,
    Yes, the process we use is similar to Outlook's. I am not sure why these properties you mentioned are lost, but I can follow up on that if you'd like.
  • Yev,
    I forgot to mention that there is a work around in Exchange 2003 which is to run multiple instances of move mailbox. It is not exactly the same as having more threads (you will have completely separate instances of the move) but it can increase the migration rate.
  • Great feature improvement with the move mailbox, especially with the use during 2003 to 2007 migration.

    My question relates to single instance. During the move mailbox process of 2007 is the system able to maintain some semblance of single-instance? Obviously, I think, this will be an issue for the migration from 2003 to 2007. If single instance isn't retained the DB could blow out when you use Move Mailbox for all those users.

    If single instance isn't maintained then an upgrade path, if you use a san to store you DBs say, will probably include rehoming the DBs to a new server. Is that viable when moving from 2003 to 2007?

    Cheers
    Kevin
  • Kevin,
    We try to maintain single instance as much as possible. If you move mailboxes that were in the same database to the same target database the common messages should be kept as a single message.

    There is no difference regarding moving messages between different Exchange 2007 databases or between 2003 and 2007 databases.

    Thanks
  • Yev,

    Probably NOT SUPPORTED but you can run multiple instances to have more threads (mentioned before) or create HKCUSoftwareMicrosoftExchangeMSExchangeAdminExchange Task WizardMaxThreads (restart ESM for changes to take effect)

    I used it to REDUCE the number of threads to move mailboxes during working hours without impacting  performance of the server to much

    We didn't see much improvement in speed by increasing the number beyond 6 (somewhere on this site they mention 16 is the max).
  • I have previously listed the progress we've been making in posting ITPro focused Systems Management blog

  • Edit: This post has been updated on 5/11/07 to change the wording around&amp;nbsp;hybrid forest deployment....