迁移到或迁移自邮箱的邮箱的存档Office 365
备注
Office 365 ProPlus 正在重命名为 适用于企业的 Microsoft 365 应用。 有关此更改的详细信息, 请阅读此博客文章。
原始 KB 编号: 2757430
问题
当您将邮箱迁移到 Microsoft Office 365 或使用存档邮箱时,您遇到一个问题,即 Microsoft Exchange Online 中的 Microsoft Exchange 邮箱复制服务 (MRS) 在迁移结束时标记邮箱的 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。 有关如何使用 PowerShell Exchange Online,请转到连接 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 的"解决方案"部分提及的"幻像存档"。 但是,存档仍Exchange本地 Exchange Server 管理员运行"方案 5 的解决方法"部分中提供的脚本。 Microsoft 部署了更新来解决此问题。 因此,以后的载出将不会受到影响。
若要确定从 Exchange Online 执行载出迁移时是否受到影响,在扫描模式下运行"方案 5 的解决方法"部分中提供的脚本。
方案 5
在此方案中,ArchiveDomain 属性的值设置为本地域。 因此Outlook找不到并打开存档邮箱。
为了解决方案 4 和方案 5,如果您将邮箱从 Exchange Online 移回本地部署环境,Microsoft 提供了以下脚本来帮助自动更改Exchange Server属性。 若要运行脚本,请按照以下步骤操作:
- 启动记事本。
- 将以下脚本复制并粘贴到记事本:
#-------------------------------------------------------------------------------
#
# 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 domai
$computer = Get-WmiObject -Class Win32_ComputerSystem
$Domain = $computer.Domai
}
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."
retur
}
$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."
}
}
- 在“文件”菜单上,单击“保存”。
- 在"另存为类型"框中,单击"所有 (文件) " 。
- 在"文件名" 框中,typeCleanup-ArchiveDomain.ps1,然后单击"保存 "。
- 找到保存该脚本文件的Cleanup-ArchiveDomain.ps1,然后结合以下参数运行脚本:
Cleanup-ArchiveDomain.ps1 [-TenantCloudDomain serviceDomain] [-Domain domain] [-Fix] [-FindAllUsersInForest]
备注
- 只有在租户使用云存档功能时,才应指定 TenantCloudDomain 参数。 参数的值应为租户用于访问云存档的 DNS 域名,如 contoso.com。
- Domain 参数用于在不是当前计算机的域的域中运行清理功能。
- Fix 开关触发实际的清理功能。 开关的默认功能 ("扫描模式) 只是为了查找用户,然后将他们输出到 CSV 文件。
- TheFindAllUsersInForest switch searches a global catalog and finds all affected users in the local forest (across all domains) . 但是,此开关不能与 Fix 开关组合使用。 一次只能修复一个域中的用户。
更多信息
仍然需要帮助? 请转到 Microsoft 社区。