How to Move a Mailbox Within a Single Forest

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

This topic explains how to use the Exchange Management Console or the Exchange Management Shell to move a mailbox within a single forest.

Before You Begin

To perform the following procedures, the account you use must be delegated the following:

  • Exchange Recipient Administrator role

  • Exchange Server Administrator role and local Administrators group for both the source and target servers

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

Also, before you perform this procedure, be aware of the following:

  • You cannot use the Move Mailbox wizard to move mailboxes across forests. To move a mailbox from one forest to another, you must use the Move-Mailbox cmdlet.

  • You can run only one instance of the Move Mailbox wizard from the Exchange Management Console at a time. However, if you want to run multiple Move Mailbox wizards at the same time, you can open multiple Exchange Management Consoles and run one instance of the Move Mailbox wizard from each console.

  • If you move a mailbox within a forest, items in the dumpster will not be moved. Items in the Deleted Items folder will be moved. For more information about configuring deleted item retention, see Configuring Deleted Mailbox and Deleted Item Retention.

Procedure

Exchange Server 2007 Service Pack 1 (SP1)

This section contains the SP1-specific graphical user interface (GUI) and Exchange Management Shell procedures.

To use the Exchange Management Console to move a mailbox

  1. Start the Exchange Management Console.

  2. In the console tree, expand Recipient Configuration, and then click Mailbox.

  3. In the result pane, click the mailbox or mailboxes that you want to move.

  4. In the action pane, click Move Mailbox.

  5. In the Move Mailbox Wizard, on the Introduction page, click Browse to select the mailbox database to where you want to move the mailbox, and then click Next.

  6. On the Move Options page, perform the following steps:

    1. Select an option for handling corrupted messages in a mailbox.

    2. (Optional) Specify a global catalog in the target forest to use for search operations.

    3. (Optional) Specify a domain controller in the target forest to use to write to the Active Directory directory service.

    4. (Optional) If you are moving the mailbox to a database on an Exchange 2003 or Exchange 2000 server, specify whether you want to move rules.

      Note

      Exchange 2003 and Exchange 2000 have a 32-kilobyte (KB) limit for the rules on a mailbox. If you want to move a mailbox that has rules exceeding 32 KB to an Exchange 2003 or Exchange 2000 server, you must specify that you do not want to move the rules.

  7. Click Next.

  8. On the Move Schedule page, specify when the move should occur, and then click Next.

  9. On the Move Mailbox page, review the summary to confirm the mailbox moves, and then click Move.

  10. On the Completion page, click Finish.

To use the Exchange Management Shell to move a mailbox

  • To move a mailbox to a destination in the same forest, run the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database"
    

    Note

    If the value of any parameter, such as the database name, contains a space, you must enclose it in quotation marks.

  • If you want to specify the number of corrupted messages that can be skipped before the move will fail, use the BadItemLimit parameter, as in the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -BadItemLimit 5
    
  • If the size limit on the source mailbox exceeds the size limit of the target database, by default, the move will fail. If you want to use the mailbox size limit of the source mailbox instead, use PreserveMailboxSizeLimit parameter. This will set the mailbox size limit for the source mailbox on the target mailbox. If the size limit for the individual source mailbox is not set, the size limit for the source database will be set on the target mailbox.

    To preserve the source mailbox size limit, run the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -PreserveMailboxSizeLimit $true
    
  • If you are moving a mailbox from Microsoft Exchange Server 2007 to Exchange Server 2003 or Exchange 2000 Server, and the mailbox has rules that total more than 32 kilobytes (KB), the move will fail and the mailbox will not be moved from the source location. To avoid this, you can use the IgnoreRuleLimitErrors parameter so that the rules are not moved along with the mailbox.

    To move a mailbox from Exchange 2007 to Exchange 2003 or Exchange 2000 without moving any of the rules, run the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -IgnoreRuleLimitErrors
    
  • If you want to specify the number of threads to use to move mailboxes, use the MaxThreads parameter. By default, the Move-Mailbox command will use four threads. For example:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -MaxThreads 6
    
  • If you are moving an entire database to a new location, you can move the database file, and then use the Move-Mailbox command to change the configuration information in the Active Directory directory service so that the mailboxes all point to the new location of the database. Use the ConfigurationOnly parameter, as in the following command:

    Move-Mailbox contoso\john -ConfigurationOnly -TargetDatabase "First Storage Group\Mailbox Database"
    
  • You can use the Get-Mailbox command to retrieve all the mailbox objects that you want to move, and pipe those objects to the Move-Mailbox command, as in the following command:

    Get-Mailbox -Database "First Storage Group\DB01" | Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database"
    
  • By default, the Move-Mailbox command does not delete the source mailbox. If you want to delete the source mailbox after it is moved to the target location, use the SourceMailboxCleanupOptions parameter, as in the following command:

    Move-Mailbox contoso\john -TargetDatabase TargetDatabase "First Storage Group\Mailbox Database" -SourceMailboxCleanupOptions DeleteSourceMailbox
    
  • If you want to specify the time-out limit for moving a mailbox, use the RetryTimeout parameter. If a mailbox move takes longer than the specified time, the move will fail and the mailbox that is being moved will be rolled back so that it is not moved from the source location. Any mailboxes that have already moved will remain at the target location. You can also specify the interval for displaying mailbox status information by using the RetryInterval parameter. For example:

    Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database" -Identity contoso\john -RetryTimeout 1:00:00 -RetryInterval 5:00
    
  • If you do not want to keep recipient policies on the mailbox after it is moved, use the IgnorePolicyMatch parameter. For example:

    Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database" -Identity contoso\john -IgnorePolicyMatch $true
    
  • If you want to filter the messages that are moved to the target mailbox, you can use any of the following filter parameters: AttachmentFilenames, ExcludeFolders, IncludeFolders, ContentKeywords, SubjectKeywords, AllContentKeywords, RecipientKeywords, SenderKeywords, Locale, StartDate, and EndDate. For example:

    Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database" -Identity contoso\john -AttachmentFilenames *.doc -ExcludeFolders \Inbox\Personal,\Inbox\OldProjects -ContentKeywords merger -SubjectKeywords Important
    

For detailed syntax and parameter information, see the Move-Mailbox reference topic.

Exchange Server 2007 RTM

This section contains the release to manufacturing (RTM)-specific GUI and Exchange Management Shell procedures.

To use the Exchange Management Console to move a mailbox

  1. Start the Exchange Management Console.

  2. In the console tree, expand Recipient Configuration, and then click Mailbox.

  3. In the result pane, click the mailbox or mailboxes that you want to move.

  4. In the action pane, click Move Mailbox.

  5. In the Move Mailbox Wizard, on the Introduction page, select the server, storage group, and mailbox database to where you want to move the mailbox, and then click Next.

  6. On the Move Options page, select an option for handling corrupted messages in a mailbox, and then click Next.

  7. On the Move Schedule page, specify when the move should occur, and then click Next.

  8. On the Move Mailbox page, review the summary to confirm the mailbox moves, and then click Move.

  9. On the Completion page, click Finish.

To use the Exchange Management Shell to move a mailbox

  • To move a mailbox to a destination in the same forest, run the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database"
    

    Note

    If the value of any parameter, such as the database name, contains a space, you must enclose it in quotation marks.

  • If you want to specify the number of corrupted messages that can be skipped before the move will fail, use the BadItemLimit parameter, as in the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -BadItemLimit 5
    
  • If the size limit on the source mailbox exceeds the size limit of the target database, by default, the move will fail. If you want to use the mailbox size limit of the source mailbox instead, use the PreserveMailboxSizeLimit parameter. This will set the mailbox size limit for the source mailbox on the target mailbox. If the size limit for the individual source mailbox is not set, the size limit for the source database will be set on the target mailbox.

    To preserve the source mailbox size limit, run the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -PreserveMailboxSizeLimit $true
    
  • If you are moving a mailbox from Microsoft Exchange Server 2007 to Exchange Server 2003 or Exchange 2000 Server, and the mailbox has rules that total more than 32 kilobytes (KB), the move will fail and the mailbox will not be moved from the source location. To avoid this, you can use the IgnoreRuleLimitErrors parameter so that the rules are not moved along with the mailbox.

    To move a mailbox from Exchange 2007 to Exchange 2003 or Exchange 2000 without moving any of the rules, run the following command:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -IgnoreRuleLimitErrors
    
  • If you want to specify the number of threads to use to move mailboxes, use the MaxThreads parameter. By default, the Move-Mailbox command will use four threads. For example:

    Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -MaxThreads 6
    
  • If you are moving an entire database to a new location, you can move the database file, and then use the Move-Mailbox command to change the configuration information in the Active Directory directory service so that the mailboxes all point to the new location of the database. Use the ConfigurationOnly parameter, as in the following command:

    Move-Mailbox contoso\john -ConfigurationOnly -TargetDatabase "First Storage Group\Mailbox Database"
    
  • You can use the Get-Mailbox command to retrieve all the mailbox objects that you want to move, and pipe those objects to the Move-Mailbox command, as in the following command:

    Get-Mailbox -Database "First Storage Group\DB01" | Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database"
    
  • By default, the Move-Mailbox command does not delete the source mailbox. If you want to delete the source mailbox after it is moved to the target location, use the SourceMailboxCleanupOptions parameter, as in the following command:

    Move-Mailbox contoso\john -TargetDatabase TargetDatabase "First Storage Group\Mailbox Database" -SourceMailboxCleanupOptions DeleteSourceMailbox
    
  • If you want to specify the time-out limit for moving a mailbox, use the RetryTimeout parameter. If a mailbox move takes longer than the specified time, the move will fail and the mailbox that is being moved will be rolled back so that it is not moved from the source location. Any mailboxes that have already moved will remain at the target location. You can also specify the interval for displaying mailbox status information by using the RetryInterval parameter. For example:

    Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database" -Identity contoso\john -RetryTimeout 1:00:00 -RetryInterval 5:00
    
  • If you do not want to keep recipient policies on the mailbox after it is moved, use the IgnorePolicyMatch parameter. For example:

    Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database" -Identity contoso\john -IgnorePolicyMatch $true
    
  • If you want to filter the messages that are moved to the target mailbox, you can use any of the following filter parameters: AttachmentFilenames, ExcludeFolders, IncludeFolders, ContentKeywords, SubjectKeywords, AllContentKeywords, Locale, StartDate, and EndDate. For example:

    Move-Mailbox -TargetDatabase "First Storage Group\Mailbox Database" -Identity contoso\john -AttachmentFilenames *.doc -ExcludeFolders \Inbox\Personal,\Inbox\OldProjects -ContentKeywords merger -SubjectKeywords Important
    

For detailed syntax and parameter information, see the Move-Mailbox (RTM) reference topic.

For More Information

For more information about supported scenarios for using the Move Mailbox wizard and the Move-Mailbox cmdlet, see Moving Mailboxes.

For detailed syntax and parameter information about the Get-Mailbox cmdlet, see the Get-Mailbox reference topic.