封存移轉至 Microsoft 365 或從 Microsoft 365 移轉的信箱問題

原始 KB 編號: 2757430

問題

當您將信箱移轉至 Microsoft 365 或使用封存信箱時,您遇到下列問題:Microsoft Exchange 信箱復寫服務 (MRS) ,Microsoft Exchange Online 在移轉結束時戳記信箱 ArchiveDomain 屬性的目標網域值。

注意事項

問題不應該發生在沒有封存信箱的帳戶上。

有五種案例與封存信箱相關。 每個案例都需要不同的解決方式。

  • 案例 1 - 上線:您將內部部署 Microsoft Exchange Server 信箱移至 Exchange Online。
  • 案例 2 - 上線:您的封存信箱存在於 Exchange Online 中,而您會將主要信箱從內部部署 Exchange Server 環境移至 Exchange Online。
  • 案例 3 - 下架:您啟用封存信箱,然後將主要信箱和封存信箱從 Exchange Online 移轉至內部部署 Exchange Server 環境。 當您的主要信箱已經在內部部署,而且您決定將封存信箱從 Exchange Online 卸除至內部部署 Exchange Server 環境時,就會發生類似的案例。
  • 案例 4 - 下線:您的主要信箱未啟用封存信箱,而您會將主要信箱從 Exchange Online 移至內部部署 Exchange Server 環境。
  • 案例 5 - 下線:您的主要信箱存在於內部部署 Exchange Server 環境中,而您的封存信箱存在於 Exchange Online 中。 當您採取下列其中一個動作時,可能會發生此案例:
    • 您已將主要信箱離線。 不過,您會將封存信箱保留在 Exchange Online 中。
    • 主要和封存信箱都位於內部部署 Exchange Server 環境中。 不過,您只能將封存信箱上線。

    注意事項

    唯一支援的封存分割案例是內部部署的主要信箱,以及 Exchange Online 中的封存信箱。

原因

如果在內部部署 Exchange Server 環境與 Exchange Online 之間移轉信箱,就會發生此問題。

如果您使用下列 Windows PowerShell Cmdlet 來檢視封存屬性,您會注意到封存狀態為 [作用中]。 不過,遺漏大部分的封存資訊。

Get-Mailbox alias |fl Name, Archive*

注意事項

您可以使用內部部署 Exchange 管理命令介面或 Exchange Online PowerShell 來執行 Cmdlet。 如需如何使用 Exchange Online PowerShell 的詳細資訊,請移至將 Windows PowerShell 連線至服務

當您執行 Cmdlet 時,結果如下所示:

Name : jsmith
ArchiveDatabase :
ArchiveGuid : 00000000-0000-0000-0000-000000000000
ArchiveName : {}
ArchiveQuota : 100 GB (107,374,182,400 bytes)
ArchiveWarningQuota : 90 GB (96,636,764,160 bytes)
ArchiveDomain : contoso.mail.onmicrosoft.com
ArchiveStatus : Active

解決方案

若要解決此問題,請根據您的案例,使用下列其中一種方法。

案例 1

案例 1 中的問題已解決,如下所示:在租用戶系統管理員啟用封存信箱之前,會解決所有對 Exchange Online 的上線移轉,並不再設定 ArchiveDomain 屬性。

解決此問題之前,用戶已回報 Outlook 中存在封存信箱,並收到驗證提示。 不過,使用者在 Outlook Web App 中看不到相同的封存信箱。 (Microsoft 將封存稱為「准刪除封存」,因為它不是使用者可存取的實際封存信箱。

案例 2

案例 2 中的問題已解決,如下所示:負責移動信箱的 MRS 元件現在會正確地考慮 Exchange Online 封存信箱的存在。 因此,用戶可以在 Outlook 或 Outlook Web App 中正確存取其封存信箱,而不會發生任何錯誤。 不用執行任何動作。

案例 3

案例 3 這兩種變化中的問題都已解決,如下所示:Exchange Online 中的 MRS 會將 ArchiveDomain 屬性的值設定為內部部署網域。 因此,用戶可以在 Outlook 或 Outlook Web App 中正確存取其封存信箱,而不會發生任何錯誤。 不用執行任何動作。

案例 4

案例 4 中的問題已解決,如下所示:在此案例中,Exchange Online 的 MRS 會將 ArchiveDomain 屬性的值設定為內部部署網域。 因此,即使未啟用封存信箱,使用者仍會在 Outlook 中看到封存信箱。 此封存類似於案例 1 的「解析」一節中提及的「准刪除封存」。 However, the archive still requires the Exchange administrator of the on-premises Exchange Server environment to run the script that's provided in the 'Resolution of Scenario 5' section. Microsoft 已部署更新來解決此案例。 因此,未來的下架將不會受到影響。

To determine whether you are affected when you perform an offboarding migration from Exchange Online, run the script that's provided in the 'Resolution of Scenario 5' section in scan mode.

案例 5

在此案例中,ArchiveDomain 屬性的值會設定為內部部署網域。 因此,Outlook 找不到並開啟封存信箱。

若要解決案例 4 和 5,如果您將信箱從 Exchange Online 移回內部部署 Exchange Server 環境,Microsoft 會提供下列腳本,以協助自動變更必要的屬性。 若要執行文稿,請遵循下列步驟:

  1. 啟動記事本。
  2. 在記事本中複製並貼上下列文稿:
#-------------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# PLEASE NOTE:
# Microsoft Corporation (or based on where you live, one of its affiliates)
# licenses this supplement to you. You may use it with each validly licensed
# copy of Microsoft Online Services Migration Tools software (the "software").
# You may not use the supplement if you do not have a license for the software.
# The license terms for the software apply to your use of this supplement.
# Microsoft may provide support services for the supplement as described at
# http://www.support.microsoft.com/common/international.aspx.
#
#-------------------------------------------------------------------------------
#
# PowerShell Source Code
#
param([Parameter(Mandatory = $false)]
[string]$TenantCloudDomain,
[Parameter(Mandatory = $false)]
[string]$Domain,
[Parameter(Mandatory = $false)]
[Switch]$Fix,
[Parameter(Mandatory = $false)]
[Switch]$FindAllUsersInForest
)
function GetNameFromDN([string]$dn)
{
if ($dn.Length -eq 0) { return $null; }
return ($dn -split ",")[0].Replace("CN=", "")
}
Import-Module ActiveDirectory
If ($TenantCloudDomain.Length -eq 0) {
$ldapQuery = "(&(objectClass=user)(msExchArchiveAddress=*))"
} else {
$ldapQuery = "(&(objectClass=user)(msExchArchiveAddress=*)(!(&(msExchArchiveGuid=*)(!(msExchArchiveDatabaseLink=*))(msExchArchiveAddress=$TenantCloudDomain))))"
}
if ($Domain.Length -eq 0) {
# default domain to computer's domain
$computer = Get-WmiObject -Class Win32_ComputerSystem
$Domain = $computer.Domain
}
if ($FindAllUsersInForest -and $Fix) {
throw "You cannot specify -FindAllUsersInForest when running in -Fix mode, only one domain can be cleaned up at a time."
}
Write-Host "Looking for objects to clean up in ${Domain}: ${ldapQuery}"
$propertiesToLoad = @("msExchMailboxGuid","homeMDB","msExchArchiveGuid","msExchArchiveDatabaseLink","msExchArchiveAddress")
$tsStart = [DateTime](Get-Date)
if ($FindAllUsersInForest) {
$m = Get-ADObject -Server "${Domain}:3268" -SearchBase "" -LDAPFilter $ldapQuery -ResultSetSize $null -Properties $propertiesToLoad
} else {
$m = Get-ADObject -Server $Domain -LDAPFilter $ldapQuery -ResultSetSize $null -Properties $propertiesToLoad
}
$elapsed = [DateTime](Get-Date) - $tsStart
if ($m -eq $null) {
Write-Host "No objects need to be cleaned up."
return
}
$cleanedCount = 0
$failedCount = 0
$filename = $("~\ArchiveDomainCleanup_{0:yyyymmdd_HHmmss}.csv" -f (Get-Date))
# Run cleanup and output data to CSV file
Write-Host "Writing output to $filename..."
try {
$m | %{
$success = $true
if ($Fix) {
$prevError = $error[0]
Set-ADObject -Identity $_ -Server $Domain -Clear "msExchArchiveAddress"
if ($error[0] -ne $prevError) {
$success = $false
Write-Host "x" -NoNewLine
} else {
Write-Host "." -NoNewLine
}
}
if ($success) {
$cleanedCount++
# object was cleaned up successfully, let's append it to output CSV.
$mm = $_ | Select ObjectGuid,DistinguishedName
# Morph guid values from binary blob to proper guid
$mbxGuid = [Guid]$_.msExchMailboxGuid
if ($_.msExchArchiveGuid -ne $null) {
$archiveGuid = [Guid]$_.msExchArchiveGuid
} else {
$archiveGuid = $null
}
Add-Member -InputObject $mm -MemberType NoteProperty -Name CleanedArchiveDomain -Value $($_.msExchArchiveAddress)
Add-Member -InputObject $mm -MemberType NoteProperty -Name ExchangeGuid -Value $mbxGuid
Add-Member -InputObject $mm -MemberType NoteProperty -Name Database -Value $(GetNameFromDN $_.homeMDB)
Add-Member -InputObject $mm -MemberType NoteProperty -Name ArchiveGuid -Value $archiveGuid
Add-Member -InputObject $mm -MemberType NoteProperty -Name ArchiveDatabase -Value $(GetNameFromDN $_.msExchArchiveDatabaseLink)
$mm
} else {
$failedCount++
}
} | Export-CSV $filename -NoTypeInformatio
}
finally {
if ($Fix) {
Write-Host ""
Write-Host "Cleaned up $cleanedCount recipients."
if ($failedCount -gt 0) {
Write-Warning "Failed to update $failedCount recipients."
}
} else {
Write-Host "Discovered $cleanedCount recipients."
}
}
  1. 在 [ 檔案] 功能表上,按兩下 [ 儲存]
  2. 在 [ 另存新檔類型] 方塊中,按兩下 [所有檔案 (] ,) ] 。
  3. 在 [ 檔名] 方塊中,typeCleanup-ArchiveDomain.ps1,然後按兩下 [ 儲存]
  4. 找出您儲存 Cleanup-ArchiveDomain.ps1 檔案的目錄,然後連同下列參數一起執行腳本:
Cleanup-ArchiveDomain.ps1 [-TenantCloudDomain serviceDomain] [-Domain domain] [-Fix] [-FindAllUsersInForest]

注意事項

  • 只有在租使用者使用雲端封存功能時,才應該指定TenantCloudDomain參數。 參數的值應該是租用戶用來存取雲端封存的 DNS 功能變數名稱,例如 contoso.com。
  • Domain 參數可用來在非目前計算機網域的網域中執行清除功能。
  • 修正參數會觸發實際的清除功能。 參數 (也稱為「掃描模式」) 的預設函式是尋找使用者,然後將其輸出至 CSV 檔案。
  • FindAllUsersInForest 參數會搜尋全域編錄,並在所有網域) 的本機樹系 (中尋找所有受影響的使用者。 不過,此參數無法與 [修正] 參數結合。 您一次只能修正一個網域中的使用者。

其他相關資訊

是否仍需要協助? 前往 Microsoft Community