Move-Mailbox (RTM)

 

適用版本: Exchange Server 2007

上次修改主題的時間: 2007-06-05

使用 Move-Mailbox 指令程式來移動您組織內的信箱,或是在不同組織之間移動信箱。

語法

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>]

詳細描述

您可以使用 Move-Mailbox 指令程式來執行下列工作:

  • 在組織的伺服器之間移動信箱。在硬體或軟體升級時,此移動可能會非常有用。
  • 在不同組織的伺服器之間移動信箱。在組織合併網路基礎結構時,此移動可能會非常有用。

若要執行 Move-Mailbox 指令程式,則必須在來源和目標伺服器上,將下列項目委派給您使用的帳戶:

  • Exchange Server 系統管理員角色
  • Exchange 收件者系統管理員角色
  • 本機 Administrators 群組
note附註:
如果您在同時作為網域控制站的電腦上執行 Exchange 2007,則若要將信箱移到這部伺服器上的資料庫,您使用的帳戶必須被委派 Exchange Server 系統管理員角色,但不必被委派 Exchange  收件者系統管理員角色。

如需管理 Microsoft Exchange Server 2007 所需之權限、委派角色及權利的相關資訊,請參閱權限考量

參數

參數 必要 類型 描述

ConfigurationOnly

必要

System.Management.Automation.SwitchParameter

ConfigurationOnly 參數會變更 Active Directory 目錄服務中 Exchange 伺服器的位置。使用此參數來將信箱導向至正常運作的伺服器。信箱內容不會移動。

Identity

必要

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

Identity 參數會指定要移動之單一信箱的收件者識別碼。如果 Get-Mailbox 命令已經傳送,則不需要此參數。

TargetDatabase

必要

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

TargetDatabase 參數會指定將要移動之信箱的資料庫。如果 Get-Mailbox 命令已經傳送,則不需要此參數。

若不指定伺服器名稱,則指令程式會搜尋本機伺服器上的資料庫。如果在相同伺服器上有多個名稱相同的資料庫,則必須指定儲存群組。

AllContentKeywords

選用

System.String[]

AllContentKeywords 參數指定要移動之內容的關鍵字。如果命令找到您在郵件內文、附件內容或主旨中指定的關鍵字,它就會匯出那些郵件。

note附註:
這與同時使用 ContentKeywordsSubjectKeywords 參數不同。如果同時使用 ContentKeywordsSubjectKeywords 參數,則命令所匯出的郵件只限郵件內文或附件內容中具有 ContentKeywords 參數所指定之關鍵字,而且主旨中也具有 SubjectKeywords 參數所指定之關鍵字的那些郵件。

AllowMerge

選用

System.Management.Automation.SwitchParameter

如果已經有一個信箱存在,則 AllowMerge 參數會指定信箱的合併。即使目標信箱已經存在,您仍可以使用此參數在不同組織之間移動信箱。信箱的內容會在目標信箱進行合併。如果使用 NTAccountOU 參數,則無法使用此參數。

AttachmentFilenames

選用

System.String[]

AttachmentFilenames 參數會指定要包含在移動中的附件。檔案名稱可以包含任何檔案類型及萬用字元。

BadItemLimit

選用

System.Int32

BadItemLimit 參數會指定要略過之錯誤項目的數量。如果不要略過錯誤項目,請設為 0。此參數的有效輸入範圍是 0 到 2,147,483,647。

ContentKeywords

選用

System.String[]

ContentKeywords 參數會指定要包含在移動中之內容的關鍵字。如果命令找到您在郵件內文或附件內容中指定的關鍵字,它就會匯出那些郵件。

DomainController

選用

Microsoft.Exchange.Data.Fqdn

若要指定將此組態變更寫入至 Active Directory 之網域控制站的網域全名 (FQDN),請在命令中加入 DomainController 參數。

EndDate

選用

System.DateTime

EndDate 參數可指定將從來源信箱移動的篩選內容結束日期。只會移動信箱中其日期為結束日期或之前日期的項目。輸入特定日期時,請使用本機電腦上設定之 [地區選項] 設定中所定義的簡短日期格式。例如,若電腦設成使用簡短日期格式 mm/dd/yyyy,請輸入 03/01/2006 以指定 2006 年 3 月 1 日。

ExcludeFolders

選用

Microsoft.Exchange.Data.Mapi.MapiFolderPath[]

ExcludeFolders 參數會指定要在移動期間排除的資料夾清單。

GlobalCatalog

選用

Microsoft.Exchange.Data.Fqdn

GlobalCatalog 參數會指定通用類別目錄,這個類別可以用來在目標樹系中執行搜尋作業。

IgnorePolicyMatch

選用

System.Management.Automation.SwitchParameter

IgnorePolicyMatch 參數會指定是否要符合收件者原則。

IgnoreRuleLimitErrors

選用

System.Management.Automation.SwitchParameter

IgnoreRuleLimitErrors 參數會指定是否要將使用者的原則移動至目標 Microsoft Exchange Server 2003 或 Exchange 2000 Server 帳戶,以避免 Microsoft Outlook 32K 的規則限制。

IncludeFolders

選用

Microsoft.Exchange.Data.Mapi.MapiFolderPath[]

IncludeFolders 參數會指定要在移動期間包含的資料夾清單。

Locale

選用

System.Globalization.CultureInfo

Locale 參數可指定要移動的郵件地區設定。該命令只會移動含指定地區設定的郵件。

MaxThreads

選用

System.Int32

MaxThreads 參數會指定要使用的執行緒數目上限。此參數的有效的輸入範圍是 0 到 30。

note附註:
要使用之執行緒的可接受範圍取決於您的 Exchange 組織的效能 。我們建議您先執行驗證測試來決定環境的可接受範圍,再同時移動多個信箱。

NTAccountOU

選用

Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter

NTAccountOU 參數會指定建立 Microsoft Windows NT 帳戶的組織單位。如果使用 AllowMerge 參數,則無法使用此參數。

PreserveMailboxSizeLimit

選用

System.Management.Automation.SwitchParameter

PreserveMailboxSizeLimit 參數會指定是否要對目標信箱套用來源信箱的大小限制選項。

ReportFile

選用

Microsoft.Exchange.Data.LocalLongFullPath

ReportFile 參數會指定 XML 報告記錄檔的路徑及檔名。

RetryInterval

選用

Microsoft.Exchange.Data.EnhancedTimeSpan

RetryInterval 參數會指定從伺服器擷取移動狀態的間隔。

RetryTimeout

選用

Microsoft.Exchange.Data.EnhancedTimeSpan

RetryTimeout 參數會指定移動信箱的逾時限制。

SourceForestCredential

選用

System.Management.Automation.PSCredential

SourceForestCredential 參數會指定連接至來源信箱時所使用的認證。

SourceForestGlobalCatalog

選用

Microsoft.Exchange.Data.Fqdn

SourceForestGlobalCatalog 參數會指定通用類別目錄,這個類別可以用來在來源樹系中執行搜尋作業。

SourceMailboxCleanupOptions

選用

Microsoft.Exchange.Management.RecipientTasks.MoveMailboxSourceCleanupType

SourcMailboxCleanupOptions 參數會指定來源信箱的清理選項。如果使用 AllowMerge 參數,則無法使用此參數。

StartDate

選用

System.DateTime

StartDate 參數可指定要從來源信箱移動的篩選內容開始日期。只會匯出信箱中其日期晚於開始日期的項目。輸入特定日期時,請使用本機電腦上設定之 [地區選項] 設定中所定義的簡短日期格式。例如,若電腦設成使用簡短日期格式 mm/dd/yyyy,請輸入 03/01/2006 以指定 2006 年 3 月 1 日。

SubjectKeywords

選用

System.String[]

SubjectKeywords 參數指定來源信箱中之項目主旨的關鍵字篩選器。

TargetForestCredential

選用

System.Management.Automation.PSCredential

TargetForestCredential 參數會指定連接至目標資料庫時所使用的認證。

ValidateOnly

選用

System.Management.Automation.SwitchParameter

ValidateOnly 參數會在不移動信箱的情況下提供進行驗證的選項。

輸入類型

傳回類型

錯誤

錯誤 描述

  

  

例外狀況

例外狀況 描述

  

  

範例

在本範例中,Move-Mailbox 命令是用來將 John Peoples 的信箱 (john@contoso.com) 移動至名稱為 NewMailboxDatabase 的新信箱資料庫中。

Move-Mailbox john@contoso.com -TargetDatabase NewMailboxDatabase

若要確保您目前閱讀的是最新資訊,並尋找其他的 Exchange Server 2007 說明文件,請造訪 Exchange Server 技術資源中心.