Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-05
Use the Move-Mailbox cmdlet to move mailboxes within your organization or between different organizations.
Syntax
move-Mailbox -Identity <MailboxIdParameter>
-TargetDatabase <DatabaseIdParameter> [-BadItemLimit
<Int32>] [-DomainController <Fqdn>] [-GlobalCatalog
<Fqdn>] [-IgnorePolicyMatch <SwitchParameter>]
[-IgnoreRuleLimitErrors <SwitchParameter>] [-MaxThreads
<Int32>] [-ReportFile <LocalLongFullPath>]
[-ValidateOnly <SwitchParameter>]
|
move-Mailbox -Identity <MailboxIdParameter>
-TargetDatabase <DatabaseIdParameter> [-AllContentKeywords
<String[]>] [-AllowMerge <SwitchParameter>]
[-AttachmentFilenames <String[]>] [-BadItemLimit
<Int32>] [-ContentKeywords <String[]>]
[-DomainController <Fqdn>] [-EndDate <DateTime>]
[-ExcludeFolders <MapiFolderPath[]>] [-GlobalCatalog
<Fqdn>] [-IgnorePolicyMatch <SwitchParameter>]
[-IgnoreRuleLimitErrors <SwitchParameter>] [-IncludeFolders
<MapiFolderPath[]>] [-Locale <CultureInfo>]
[-MaxThreads <Int32>] [-NTAccountOU
<OrganizationalUnitIdParameter>] [-PreserveMailboxSizeLimit
<SwitchParameter>] [-ReportFile <LocalLongFullPath>]
[-RetryInterval <EnhancedTimeSpan>] [-RetryTimeout
<EnhancedTimeSpan>] [-SourceForestCredential
<PSCredential>] [-SourceForestGlobalCatalog <Fqdn>]
[-SourceMailboxCleanupOptions <None | DeleteSourceMailbox |
DeleteSourceNTAccount>] [-StartDate <DateTime>]
[-SubjectKeywords <String[]>] [-TargetForestCredential
<PSCredential>] [-ValidateOnly
<SwitchParameter>]
|
move-Mailbox -Identity <MailboxIdParameter>
-ConfigurationOnly <SwitchParameter> -TargetDatabase
<DatabaseIdParameter> [-BadItemLimit <Int32>]
[-DomainController <Fqdn>] [-GlobalCatalog <Fqdn>]
[-IgnorePolicyMatch <SwitchParameter>] [-MaxThreads
<Int32>] [-ReportFile <LocalLongFullPath>]
[-ValidateOnly <SwitchParameter>]
|
move-Mailbox -Identity <MailboxIdParameter>
-TargetDatabase <DatabaseIdParameter> [-BadItemLimit
<Int32>] [-DomainController <Fqdn>] [-GlobalCatalog
<Fqdn>] [-IgnorePolicyMatch <SwitchParameter>]
[-MaxThreads <Int32>] [-ReportFile <LocalLongFullPath>]
[-ValidateOnly <SwitchParameter>]
|
Parameters
Parameter | Required | Type | Description | ||
---|---|---|---|---|---|
ConfigurationOnly |
Required |
System.Management.Automation.SwitchParameter |
The ConfigurationOnly parameter changes the Exchange server location in the Active Directory directory service. Use this parameter to direct the mailbox to a functional server. The mailbox content is not moved. |
||
Identity |
Required |
Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter |
The Identity parameter specifies the recipient identification of the single mailbox to move. If the Get-Mailbox command is piped, this parameter is not required. |
||
TargetDatabase |
Required |
Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter |
The TargetDatabase parameter specifies the database to which the mailbox will be moved. If the Get-Mailbox command is piped, this parameter is not required. If you do not specify the server name, the cmdlet will search for the database on the local server. If you have multiple databases with the same name on the same server, you must specify the storage group. |
||
AllContentKeywords |
Optional |
System.String[] |
The AllContentKeywords parameter specifies the keywords of the content to include in the move. If the command finds a keyword that you specify in the message body, attachment content, or subject, it will export those messages.
|
||
AllowMerge |
Optional |
System.Management.Automation.SwitchParameter |
The AllowMerge parameter specifies the merging of mailboxes if one mailbox already exists. You can use this parameter to move a mailbox between different organizations even if a target mailbox already exists. The contents of the mailbox are merged at the target. This parameter cannot be used if the NTAccountOU parameter is used. |
||
AttachmentFilenames |
Optional |
System.String[] |
The AttachmentFilenames parameter specifies the attachments to be included in the move. File names can include any file type and wildcard characters. |
||
BadItemLimit |
Optional |
System.Int32 |
The BadItemLimit parameter specifies the number of bad items to skip. Use 0 to not skip bad items. The valid input range for this parameter is 0 to 2,147,483,647. |
||
ContentKeywords |
Optional |
System.String[] |
The ContentKeywords parameter specifies the keywords of the content to include in the move. If the command finds a keyword that you specify in the message body or in the attachment content, it will export those messages. |
||
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory, include the DomainController parameter in the command. |
||
EndDate |
Optional |
System.DateTime |
The EndDate parameter specifies the end date for filtering content that will be moved from the source mailbox. Only items in the mailbox whose date is prior to or the same as the end date will be moved. When you enter a specific date, use the short date format that is defined in the Regional Options settings that are configured on the local computer. For example, if your computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2006 to specify March 1, 2006. |
||
ExcludeFolders |
Optional |
Microsoft.Exchange.Data.Mapi.MapiFolderPath[] |
The ExcludeFolders parameter specifies the list of folders to exclude during the move. |
||
GlobalCatalog |
Optional |
Microsoft.Exchange.Data.Fqdn |
The GlobalCatalog parameter specifies the global catalog in which to perform search operations in the target forest. |
||
IgnorePolicyMatch |
Optional |
System.Management.Automation.SwitchParameter |
The IgnorePolicyMatch parameter specifies whether to match recipient policies. |
||
IgnoreRuleLimitErrors |
Optional |
System.Management.Automation.SwitchParameter |
The IgnoreRuleLimitErrors parameter specifies whether to move the user's rules to the target Microsoft Exchange Server 2003 or Exchange 2000 Server account to avoid the Microsoft Outlook 32K rules limit. |
||
IncludeFolders |
Optional |
Microsoft.Exchange.Data.Mapi.MapiFolderPath[] |
The IncludeFolders parameter specifies the list of folders to include during the move. |
||
Locale |
Optional |
System.Globalization.CultureInfo |
The Locale parameter specifies the locale of messages to move. The command will move only messages with the locale that you specify. |
||
MaxThreads |
Optional |
System.Int32 |
The MaxThreads parameter specifies the maximum number of threads to use. The valid input range for this parameter is 0 to 30.
|
||
NTAccountOU |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter |
The NTAccountOU parameter specifies the organizational unit in which the Microsoft Windows NT accounts are created. This parameter cannot be used if the AllowMerge parameter is used. |
||
PreserveMailboxSizeLimit |
Optional |
System.Management.Automation.SwitchParameter |
The PreserveMailboxSizeLimit parameter specifies whether to apply the size limit options of the source mailbox to the target mailbox. |
||
ReportFile |
Optional |
Microsoft.Exchange.Data.LocalLongFullPath |
The ReportFile parameter specifies the path and file name for the XML Report log. |
||
RetryInterval |
Optional |
Microsoft.Exchange.Data.EnhancedTimeSpan |
The RetryInterval parameter specifies the interval for retrieving the move's status from the server. |
||
RetryTimeout |
Optional |
Microsoft.Exchange.Data.EnhancedTimeSpan |
The RetryTimeout parameter specifies the time-out limit for moving a mailbox. |
||
SourceForestCredential |
Optional |
System.Management.Automation.PSCredential |
The SourceForestCredential parameter specifies the credentials that are used when connecting to the source mailbox. |
||
SourceForestGlobalCatalog |
Optional |
Microsoft.Exchange.Data.Fqdn |
The SourceForestGlobalCatalog parameter specifies the global catalog in which to perform search operations in the source forest. |
||
SourceMailboxCleanupOptions |
Optional |
Microsoft.Exchange.Management.RecipientTasks.MoveMailboxSourceCleanupType |
The SourcMailboxCleanupOptions parameter specifies cleanup options for the source mailbox. This parameter cannot be used if the AllowMerge parameter is used. |
||
StartDate |
Optional |
System.DateTime |
The StartDate parameter specifies the start date for filtering content that will be moved from the source mailbox. Only items in the mailbox whose date is later than the start date will be moved. When you enter a specific date, use the short date format that is defined in the Regional Options settings that are configured on the local computer. For example, if your computer is configured to use the short date format mm/dd/yyyy, enter 03/01/2006 to specify March 1, 2006. |
||
SubjectKeywords |
Optional |
System.String[] |
The SubjectKeywords parameter specifies the keyword filters for subjects of items in the source mailbox. |
||
TargetForestCredential |
Optional |
System.Management.Automation.PSCredential |
The TargetForestCredential parameter specifies the credentials that are used when connecting to the target database. |
||
ValidateOnly |
Optional |
System.Management.Automation.SwitchParameter |
The ValidateOnly parameter provides the option to validate the move without moving the mailbox. |
Detailed Description
You can use the Move-Mailbox cmdlet to perform the following tasks:
- Move a mailbox between servers in an organization. This move
might be useful during hardware or software upgrades.
- Move a mailbox between servers in different organizations. This
move might be useful when organizations merge network
infrastructures.
To run the Move-Mailbox cmdlet, the account you use must be delegated the following on both the source and target servers:
- Exchange Server Administrator role
- Exchange Recipient Administrator role
- local Administrators group
Note: |
---|
If you are running Exchange 2007 on a computer that also functions as a domain controller, to move a mailbox to a database on this server the account you use must be delegated the Exchange Server Administrator role, but does not need to be delegated the Exchange Recipient Administrator role. |
For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.
Input Types
Return Types
Errors
Error | Description |
---|---|
|
|
Exceptions
Exceptions | Description |
---|---|
|
|
Example
In this example, the Move-Mailbox command is used to move John Peoples' mailbox (john@contoso.com) to a new mailbox database named NewMailboxDatabase.
Copy Code | |
---|---|
Move-Mailbox john@contoso.com -TargetDatabase NewMailboxDatabase |