使用批处理迁移将 Exchange 2010 公用文件夹迁移到 Exchange 2016Use batch migration to migrate Exchange 2010 public folders to Exchange 2016

将公用文件夹从 Exchange Server 2010 SP3 RU8 迁移到Exchange Server林中的 2016。Migrate your public folders from Exchange Server 2010 SP3 RU8 to Exchange Server 2016 within the same forest.

我们将 Exchange 2010 SP3 RU8 或更高版本服务器称为 旧版 Exchange 服务器We refer to the Exchange 2010 SP3 RU8 or later server as the legacy Exchange server.

备注

本文中介绍的批处理迁移方法是将旧版公用文件夹迁移到 Exchange Server。The batch migration method described in this article is the only supported method for migrating legacy public folders to Exchange Server. 用于迁移公用文件夹的串行迁移旧方法即将被弃用,且不再受 Microsoft 支持。The old serial migration method for migrating public folders is being deprecated and is no longer supported by Microsoft.

您需要使用 *MigrationBatch cmdlet 执行迁移,并使用 *PublicFolderMigrationRequest cmdlet 进行故障排除。You'll perform the migration by using the *MigrationBatch cmdlets, and the *PublicFolderMigrationRequest cmdlets for troubleshooting. 此外,你将使用以下 PowerShell 脚本:In addition, you'll use the following PowerShell scripts:

  • Export-PublicFolderStatistics.ps1:此脚本创建文件夹名称到文件夹大小的映射文件。Export-PublicFolderStatistics.ps1: This script creates the folder name-to-folder size mapping file.

  • Export-PublicFolderStatistics.psd1:此支持文件由 Export-PublicFolderStatistics.ps1 脚本使用,并且应下载到同一位置。Export-PublicFolderStatistics.psd1: This support file is used by the Export-PublicFolderStatistics.ps1 script and should be downloaded to the same location.

  • PublicFolderToMailboxMapGenerator.ps1:此脚本创建公用文件夹到邮箱的映射文件。PublicFolderToMailboxMapGenerator.ps1: This script creates the public folder-to-mailbox mapping file.

  • PublicFolderToMailboxMapGenerator.strings.psd1:此支持文件由 PublicFolderToMailboxMapGenerator.ps1 脚本使用,并且应下载到同一位置。PublicFolderToMailboxMapGenerator.strings.psd1: This support file is used by the PublicFolderToMailboxMapGenerator.ps1 script and should be downloaded to the same location.

  • Create-PublicFolderMailboxesForMigration.ps1:此脚本为迁移创建目标公用文件夹邮箱。Create-PublicFolderMailboxesForMigration.ps1: This script creates the target public folder mailboxes for the migration. 此外,此脚本依据 公用文件夹的限制中建议的每个公用文件夹邮箱上用户登录次数的准则,计算用于处理估计的用户负载所需要的邮箱数。In addition, this script calculates the number of mailboxes necessary to handle the estimated user load, based on the guidelines for the number of user logons per public folder mailbox recommended in Limits for public folders.

  • Create-PublicFolderMailboxesForMigration.strings.psd1:此支持文件由 Create-PublicFolderMailboxesForMigration.ps1 脚本使用,并且应下载到同一位置。Create-PublicFolderMailboxesForMigration.strings.psd1: This support file is used by the Create-PublicFolderMailboxesForMigration.ps1 script and should be downloaded to the same location.

步骤 1:下载迁移 脚本部分提供有关在何处下载这些脚本的详细信息。The Step 1: Download the migration scripts section provides details about where to download these scripts. 请务必将所有脚本下载到同一位置。Be sure to download all scripts to the same location.

有关公用文件夹相关的更多管理任务,请参阅公用文件夹程序For additional management tasks related to public folders, see Public folder procedures.

哪些迁移路径受 Exchange Server支持?What migration pathways are supported for Exchange Server versions?

Exchange 支持从以下旧版 Exchange Server 移动公用文件夹:Exchange supports moving your public folders from the following legacy versions of Exchange Server:

  • Exchange 2010 SP3 RU8 或更高版本Exchange 2010 SP3 RU8 or later

不能将公用文件夹直接从 Exchange 2003 迁移出来。如果组织运行的是 Exchange 2003,需要将所有公用文件夹数据库和副本都移到 Exchange 2010 SP3 RU8 或更高版本中。无法在 Exchange 2003 上保留公用文件夹副本。此外,发往 Exchange 2016 公用文件夹的邮件不能通过 Exchange 2003 服务器进行路由。You can't migrate public folders directly from Exchange 2003. If you're running Exchange 2003 in your organization, you need to move all public folder databases and replicas to Exchange 2010 SP3 RU8 or later. No public folder replicas can remain on Exchange 2003. Additionally, mail destined for an Exchange 2016 public folder can't be routed through an Exchange 2003 server.

在开始之前,您需要知道什么?What do you need to know before you begin?

  • 在开始之前,我们建议您完整阅读本主题,因为有些步骤需要停机时间。Before you begin, we recommend that you read this topic in its entirety as downtime is required for some steps.

  • Exchange 2010 服务器需要运行 Exchange 2010 SP3 RU8 或更高版本。The Exchange 2010 server needs to be running Exchange 2010 SP3 RU8 or later.

  • 一次最多可以将 500,000 个公用文件夹迁移到 Exchange 2016。The maximum number of public folders that can be migrated to Exchange 2016 in a single migration is 500,000.

  • 在 Exchange 2016 中,你必须是"组织管理"角色组的成员。若要详细了解如何启用"组织管理"角色组,请参阅管理角色组In Exchange 2016, you need to be a member of the Organization Management role group. For details about how to enable the Organization Management role group, see Manage role groups.

  • 在 Exchange 2010 中,必须是组织管理或服务器管理 RBAC 角色组的成员。有关详细信息,请参阅向角色组添加成员In Exchange 2010, you need to be a member of the Organization Management or Server Management RBAC role groups. For details, see Add Members to a Role Group.

  • 开始迁移之前,您应考虑公用文件夹的限制Before you migrate, you should consider the Limits for public folders.

  • 迁移之前,将所有用户邮箱移动到 Exchange 2016,因为具有 Exchange 2010 邮箱的用户将无法访问 Exchange 2016 上的公用文件夹。Before you migrate, move all user mailboxes to Exchange 2016, because users with Exchange 2010 mailboxes will not have access to public folders on Exchange 2016. 有关详细信息,请参阅邮箱移动Exchange Server。For details, see Mailbox moves in Exchange Server.

  • 在多域环境中,如果 Exchange 在子域中运行,则迁移到 Exchange 2016 后,已启用邮件的公用文件夹将停止工作。In a multiple-domain environment, mail-enabled public folders will stop working after migration to Exchange 2016 if Exchange is running in a child domain. 这是因为在 Exchange 2016 中,启用邮件的公用文件夹对象必须位于根域下。This is because in Exchange 2016, mail-enabled public folder objects are required to be under the root domain. 若要解决此问题,需要禁用启用邮件的公用文件夹,然后重新启用邮件,这将允许您将它们移动到正确的域位置。To resolve this, you need to mail-disable your mail-enabled public folders and then mail-enable them again, which will allow you to move them to the correct domain location.

  • 迁移完成后,如果你想要让外部发件人向迁移的已启用邮件功能的公用文件夹发送邮件,则至少需要向" 匿名"用户授予" 创建项目"权限。如果不执行此操作,外部发件人将收到一封传递失败通知,邮件将不会传递到迁移的已启用邮件功能的公用文件夹。要了解如何设置匿名用户的权限,请参阅 对公用文件夹启用或禁用邮件After the migration is complete, if you want external senders to send mail to the migrated mail-enabled public folders, the Anonymous user needs to be granted at least the Create Items permission. If you don't do this, external senders will receive a delivery failure notification and the messages won't be delivered to the migrated mail-enabled public folder. To read more about how to set permissions on the Anonymous user, see Mail-enable or mail-disable a public folder.

  • 必须使用单个迁移批处理来迁移所有公用文件夹数据。You must use a single migration batch to migrate all of your public folder data. Exchange 一次仅允许创建一个迁移批处理。Exchange allows creating only one migration batch at a time. 如果您尝试同时创建多个迁移批处理,则会导致错误。If you attempt to create more than one migration batch simultaneously, the result will be an error.

  • 若要了解可能适用于此主题中过程的键盘快捷键,请参阅 Exchange 管理中心内的键盘快捷键For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard shortcuts in the Exchange admin center.

重要

在开始迁移之前,请确保将仲裁邮箱迁移到目标 Exchange 服务器。Before you begin your migration, make sure you migrate your arbitration mailbox to the target Exchange server. 否则,迁移批处理将挂起到"开始 " 状态。Otherwise, your migration batch will hang in the Starting state. 若要标识迁移仲裁邮箱,请运行以下 cmdlet:To identify your migration arbitration mailbox, run the following cmdlet:
Get-Mailbox -Arbitration -Identity Migration.*

步骤 1:下载迁移脚本Step 1: Download the migration scripts

  1. Public Folders Migration Scripts(公用文件夹迁移脚本)下载所有的脚本和支持文件。Download all scripts and supporting files from Public Folders Migration Scripts.

  2. 将脚本保存到将运行 PowerShell 的本地电脑。例如,C:\PFScripts。请确保所有的脚本都保存在相同的位置。Save the scripts to the local computer on which you'll be running PowerShell. For example, C:\PFScripts. Make sure all scripts are saved in the same location.

步骤 2:准备迁移Step 2: Prepare for the migration

在开始迁移之前,执行以下先决条件步骤。Perform the following prerequisite steps before you begin the migration.

Exchange 2010 服务器上的先决条件步骤Prerequisite steps on the Exchange 2010 server

  1. 为了在迁移结束时进行验证,我们建议您首先在 Exchange 2010 服务器上运行以下命令,获取当前公用文件夹部署的快照:For verification purposes at the end of migration, we recommend that you first run the following commands on the Exchange 2010 server to take snapshots of your current public folder deployment:

    • 运行以下命令,获取原始源文件夹结构的快照:Run the following command to take a snapshot of the original source folder structure:

      Get-PublicFolder -Recurse | Export-CliXML C:\PFMigration\Legacy_PFStructure.xml
      
    • 运行以下命令,获取公用文件夹统计信息(如项目计数、大小和所有者)的快照:Run the following command to take a snapshot of public folder statistics such as item count, size, and owner:

      Get-PublicFolderStatistics | Export-CliXML C:\PFMigration\Legacy_PFStatistics.xml
      
    • 运行以下命令,获取权限的快照:Run the following command to take a snapshot of the permissions:

      Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML C:\PFMigration\Legacy_PFPerms.xml
      
  2. 如果公用文件夹的名称中包含反 () ,迁移将在父公用文件夹中创建迁移 \ 的公用文件夹。If the name of a public folder contains a backslash ( \ ), migration will create the migrated public folders in the parent public folder. 在迁移之前,我们建议您为名称中包含反斜线的公用文件夹重命名。Before you migrate, we recommend that you rename any public folders that have a backslash in the name.

    若要在 Exchange 2010 中查找名称中带反杠的公用文件夹,请运行以下命令:To locate public folders in Exchange 2010 that have a backslash in the name, run the following command:

    Get-PublicFolderStatistics -ResultSize Unlimited | Where {($_.Name -like "*\*") -or ($_.Name -like "*/*") } | Format-List Name, Identity
    

    如果返回任何公用文件夹,您可以通过使用以下命令对它们进行重命名:If any public folders are returned, you can rename them by running the following command:

    Set-PublicFolder -Identity <public folder identity> -Name <new public folder name>
    
  3. 通过运行以下命令,确保没有以前成功迁移的记录:Make sure there isn't a record of a previously successful migration by running the following command:

    Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete
    

    以前成功的迁移将 PublicFoldersLockedforMigrationPublicFolderMigrationComplete 属性设置为值 ,这 True 可能会导致新迁移请求失败。A previously successful migration will set the PublicFoldersLockedforMigration or PublicFolderMigrationComplete properties to the value True, which will cause your new migration request to fail.

    如果属性值为 True ,请运行以下命令以将其更改为 FalseIf the property values are True, run the following command to change them to False:

    Set-OrganizationConfig -PublicFoldersLockedforMigration $false -PublicFolderMigrationComplete $false
    

    备注

    重置这些属性后,您必须等待 Exchange 检测到新设置。此过程最多可能需要两个小时才能完成。After resetting these properties, you need to wait for Exchange to detect the new settings. This may take up to two hours to complete.

有关语法和参数的详细信息,请参阅下列主题:For detailed syntax and parameter information, see the following topics:

必须先在 Exchange 2016 服务器上执行的步骤Prerequisite steps on the Exchange 2016 server

  1. 请确保没有现有的公用文件夹迁移请求。如果有,请清除它们,否则您自己的迁移请求将会失败。并非所有情况都需要此步骤;只有在您认为管道中可能存在现有迁移请求时,才需要此步骤。Make sure there are no existing public folder migration requests. If there are, clear them or your own migration request will fail. This step isn't required in all cases; it's only required if you think there may be an existing migration request in the pipeline.

    重要

    在删除迁移请求之前,请务必了解现有公用文件夹的存在原因。运行以下命令可以确定上一个请求的提出时间并诊断可能发生的任何问题。您可能需要与组织中的其他管理员沟通,以确定更改原因。Before removing a migration request, it is important to understand why there was an existing one. Running the following commands will determine when a previous request was made and help you diagnose any problems that may have occurred. You may need to communicate with other administrators in your organization to determine why the change was made.

    • 运行以下命令以发现任何现有的批处理迁移请求:Run the following command to discover any existing batch migration requests:

      $batch = Get-MigrationBatch | ?{$_.MigrationType.ToString() -eq "PublicFolder"}
      
    • 运行以下命令以删除任何现有的公用文件夹批处理迁移请求。Run the following command to remove any existing public folder batch migration requests.

      $batch | Remove-MigrationBatch -Confirm:$false
      
  2. 通过运行以下命令,确保 Exchange 2016 服务器上不存在公用文件夹或公用文件夹邮箱:Make sure no public folders or public folder mailboxes exist on the Exchange 2016 servers by running the following command:

    Get-Mailbox -PublicFolder
    

    如果此命令没有返回任何公用文件夹邮箱,请继续执行第 3 步:生成 .csv 文件。如果此命令返回了任何公用文件夹邮箱,请运行以下命令,检查是否有任何公用文件夹:If the command didn't return any public folder mailboxes, continue to Step 3: Generate the .csv files. If the command returned any public folders, run the following command to see if any public folders exist:

    Get-PublicFolder
    

    如果有任何公用文件夹,请运行以下命令将其删除。If you have any public folders, run the following commands to remove them. 请确保您已保存公用文件夹中的所有信息。Make sure you've saved any information that was in the public folders.

    备注

    删除后,公用文件夹中的所有信息都会永久删除。All information contained in the public folders will be permanently deleted when you remove them.

    Get-Mailbox -PublicFolder | Where {$_.IsRootPublicFolderMailbox -eq $false} | Remove-Mailbox -PublicFolder -Force -Confirm:$false
    
    Get-Mailbox -PublicFolder | Remove-Mailbox -PublicFolder -Force -Confirm:$false
    

有关语法和参数的详细信息,请参阅下列主题:For detailed syntax and parameter information, see the following topics:

步骤 3:生成 .csv 文件Step 3: Generate the .csv files

  1. 在 Exchange 2010 服务器上,运行脚本以创建文件夹 Export-PublicFolderStatistics.ps1 名称到文件夹大小的映射文件。On the Exchange 2010 server, run the Export-PublicFolderStatistics.ps1 script to create the folder name-to-folder size mapping file. This script needs to be run by a local administrator.This script needs to be run by a local administrator. The file will contain two columns: FolderName and FolderSize.The file will contain two columns: FolderName and FolderSize. The values for the FolderSize column will be displayed in bytes.The values for the FolderSize column will be displayed in bytes. 例如 \ ,PublicFolder01,10000。For example, \PublicFolder01,10000.

    .\Export-PublicFolderStatistics.ps1 <Folder to size map path> <FQDN of source server>
    
    • FQDN of source server 等于托管公用文件夹层次结构的邮箱服务器的完全限定的域名。FQDN of source server equals the fully qualified domain name of the Mailbox server where the public folder hierarchy is hosted.

    • Folder to size map path 表示文件名和要用来保存 .csv 文件的网络共享文件夹路径。在本主题的后面部分,将需要从 Exchange 2016 服务器访问此文件。如果仅指定文件名,则会在本地计算机上的当前 PowerShell 目录中生成此文件。Folder to size map path equals the file name and path on a network shared folder where you want the .csv file saved. Later in this topic, you'll need to access this file from the Exchange 2016 server. If you specify only the file name, the file will be generated in the current PowerShell directory on the local computer.

  2. 运行 PublicFolderToMailboxMapGenerator.ps1 脚本以创建公用文件夹到邮箱的映射文件。Run the PublicFolderToMailboxMapGenerator.ps1 script to create the public folder-to-mailbox mapping file. 此文件用于计算 Exchange 2016 服务器上公用文件夹邮箱的正确数量。This file is used to calculate the correct number of public folder mailboxes on the Exchange 2016 server.

    备注

    If the name of a public folder contains a backslash **, the public folders will be created in the parent public folder. We recommend that you review the .csv file and edit any names that contain a backslash.If the name of a public folder contains a backslash **, the public folders will be created in the parent public folder. We recommend that you review the .csv file and edit any names that contain a backslash.

    .\PublicFolderToMailboxMapGenerator.ps1 <Maximum mailbox size in bytes> <Folder to size map path> <Folder to mailbox map path>
    
    • Maximum mailbox size in bytes 等于您要为新的公用文件夹邮箱设置的最大大小。在指定此设置时,请务必允许扩展,以便可以扩大公用文件夹邮箱。Maximum mailbox size in bytes equals the maximum size you want to set for the new public folder mailboxes. When specifying this setting, be sure to allow for expansion so the public folder mailbox has room to grow.

    • Folder to size map path 等于运行脚本时创建的 .csv 文件的完整 Export-PublicFolderStatistics.ps1 文件路径。Folder to size map path equals the full file path of the .csv file you created when running the Export-PublicFolderStatistics.ps1 script.

    • Folder to mailbox map path 等于通过此步骤创建的文件夹到邮箱 .csv 文件的文件名和路径。如果您仅指定文件名,则会在本地计算机上的当前 PowerShell 目录中生成此文件。Folder to mailbox map path equals the file name and path of the folder-to-mailbox .csv file that you'll create with this step. If you specify only the file name, the file will be generated in the current PowerShell directory on the local computer.

第 4 步:在 Exchange 2016 中创建公用文件夹邮箱Step 4: Create the public folder mailboxes in Exchange 2016

运行以下命令来创建目标公用文件夹邮箱。Run the following command to create the target public folder mailboxes. 脚本将为之前通过运行脚本在步骤 3 中生成的 .csv 文件的每个邮箱创建一个目标 PublicFoldertoMailboxMapGenerator.ps1 邮箱。The script will create a target mailbox for each mailbox in the .csv file that you generated previously in Step 3 by running the PublicFoldertoMailboxMapGenerator.ps1 script.

.\Create-PublicFolderMailboxesForMigration.ps1 -FolderMappingCsv Mapping.csv -EstimatedNumberOfConcurrentUsers:<estimate>

Mapping.csv 是脚本在步骤 PublicFoldertoMailboxMapGenerator.ps1 3 中生成的文件。Mapping.csv is the file generated by the PublicFoldertoMailboxMapGenerator.ps1 script in Step 3. 同时浏览某个公用文件夹层次结构的用户连接估计数量通常少于组织中的用户总数。The estimated number of simultaneous user connections browsing a public folder hierarchy is usually less than the total number of users in an organization.

步骤 5:启动迁移请求Step 5: Start the migration request

在 Exchange 命令行管理程序 中将批处理迁移请求提交后,可以在 EAC (Exchange 管理中心查看和管理) 。After you crate the batch migration request in the Exchange Management Shell, you can view the requests and manage them in the Exchange admin center (EAC).

  1. 在 Exchange 2016 服务器上,运行以下命令:On the Exchange 2016 server, run the following command:

    New-MigrationBatch -Name PFMigration -SourcePublicFolderDatabase (Get-PublicFolderDatabase -Server <Source server name>) -CSVData (Get-Content <Folder to mailbox map path> -Encoding Byte) -NotificationEmails <email addresses for migration notifications>
    

    参数 NotificationEmails 是可选的。The NotificationEmails parameter is optional.

  2. 在 EAC 或 Exchange 命令行管理程序 中开始迁移。Start the migration in the EAC or in the Exchange Management Shell.

    • 在 Exchange 命令行管理程序中,运行以下命令:In the Exchange Management Shell, run the following command:

      Start-MigrationBatch PFMigration
      
    • 在 EAC 中:In the EAC:

      1. 登录 Exchange Online 并打开 EAC。Log into Exchange Online and open the EAC.

      2. 转到收件人 > 迁移Go to Recipients > Migration.

      3. 选择您刚刚创建的迁移批处理,然后单击启动按钮。Select the migration batch you just created, and then click the start button.

      在 EAC 中 ,"状态"列将显示初始批处理状态为 "已创建"。In the EAC, the Status column will show the initial batch status as Created. The status changes to Syncing during migration.The status changes to Syncing during migration. When the migration request is complete, the status will be Synced.When the migration request is complete, the status will be Synced. You can double-click a batch to view the status of individual mailboxes within the batch.You can double-click a batch to view the status of individual mailboxes within the batch. Mailbox jobs begin with a status of Queued.Mailbox jobs begin with a status of Queued. 作业开始时,状态为"正在 同步", 一旦完成, InitialSync 状态将显示"已 同步"。When the job begins the status is Syncing, and once InitialSync is complete, the status will show Synced.

您可以在 EAC 的"收件人迁移"选项卡中查看和管理 > 迁移的进度和完成情况。You can view and manage the progress and completion of the migration in the Recipients > Migration tab in the EAC.

由于 New-MigrationBatch cmdlet 可启动每个公用文件夹邮箱的邮箱迁移请求,因此您可以使用 EAC 中的邮箱迁移页查看这些请求的状态,并且您可以创建可以通过电子邮件发送的迁移报告。Because the New-MigrationBatch cmdlet initiates a mailbox migration request for each public folder mailbox, you can view the status of these requests using the mailbox migration page in the EAC, and you can create migration reports that can be emailed to you.

  1. 登录 Exchange Online 并打开 EAC。Log into Exchange Online and open the EAC.

  2. 转到收件人 > 迁移Go to Recipients > Migration.

  3. 选择刚创建的迁移请求,然后单击" 详细信息" 窗格中的"查看 详细信息 "。Select the migration request that you just created and then click View Details in the Details pane.

有关语法和参数的详细信息,请参阅下列主题:For detailed syntax and parameter information, see the following topics:

步骤 6:锁定 Exchange 2010 服务器上公用文件夹,以最终迁移 (所需的停机时间) Step 6: Lock down the public folders on the Exchange 2010 server for final migration (downtime required)

直到此刻之前,用户都能够在迁移过程中访问公用文件夹。Until this point in the migration, users have been able to access public folders. 接下来的步骤将注销 Exchange 2010 公用文件夹中的用户,并锁定这些文件夹,同时迁移完成其最终同步。The next steps will log users off from the Exchange 2010 public folders and lock the folders while the migration completes its final synchronization. 用户将无法在此过程中访问公用文件夹。Users won't be able to access public folders during this process. 而且,任何发送到已启用邮件的公用文件夹的邮件都会排队,且在公用文件夹迁移完成前不会传递。Also, any mail sent to mail-enabled public folders will be queued and won't be delivered until the public folder migration is complete.

在运行下面 PublicFoldersLockedForMigration 所述的命令之前,请确保所有作业都为 "已同步" 状态。Before you run the PublicFoldersLockedForMigration command as described below, make sure that all jobs are in the Synced state. 为此,可以运行 Get-PublicFolderMailboxMigrationRequest 命令。You can do this by running the Get-PublicFolderMailboxMigrationRequest command. 仅在确认所有作业都为"已同步"状态后,才 继续执行此步骤。Continue with this step only after you've verified that all jobs are in the Synced state.

在 Exchange 2010 服务器上,运行以下命令锁定公用文件夹以完成操作。On the Exchange 2010 server, run the following command to lock the public folders for finalization.

Set-OrganizationConfig -PublicFoldersLockedForMigration:$true

有关语法和参数的详细信息,请参阅 Set-OrganizationConfigFor detailed syntax and parameter information, see Set-OrganizationConfig.

如果组织具有多个公用文件夹数据库,则需要等到公用文件夹复制完成,才能确认所有公用文件夹数据库已选取属性值,并且用户最近对文件夹进行的任何挂起更改已在整个组织中聚合。 PublicFoldersLockedForMigrationIf your organization has multiple public folder databases, you'll need to wait until public folder replication is complete to confirm that all public folder databases have picked up the PublicFoldersLockedForMigration property value and any pending changes users recently made to folders have converged across the organization. 这可能需要几个小时。This may take several hours.

步骤 7:完成公用文件夹迁移(需要停机时间)Step 7: Finalize the public folder migration (downtime required)

首先,运行以下 cmdlet 以将 Exchange 2016 部署类型更改为" 远程":First, run the following cmdlet to change the Exchange 2016 deployment type to Remote:

Set-OrganizationConfig -PublicFoldersEnabled Remote

完成此操作后,您可以通过运行下面的命令来完成公用文件夹迁移:Once that is done, you can complete the public folder migration by running the following command:

Complete-MigrationBatch PFMigration

或者,您可以单击 EAC 中的“完成此迁移批处理”,以此来完成迁移。Or, in EAC, you can complete the migration by clicking Complete this migration batch.

完成迁移后,Exchange 会在 Exchange 2010 服务器与 Exchange 2016 之间执行最终同步。When you complete the migration, Exchange will perform a final synchronization between the Exchange 2010 server and Exchange 2016. 如果最终同步成功,则会解锁 Exchange 2016 服务器上的公用文件夹,并且迁移批处理的状态会先后变为“正在完成”和“已完成”。If the final synchronization is successful, the public folders on the Exchange 2016 server will be unlocked and the status of the migration batch will change to Completing, and then Completed. 通常,迁移批处理在状态从 " 已同步"更改到"正在完成"之前需要几个小时,此时将开始最终同步。It is common for the migration batch to take a few hours before its status changes from Synced to Completing, at which point the final synchronization will begin.

备注

如果迁移批处理文件出于任何原因未最终完成 (PublicFolderMigrationComplete 属性值为 False) 则重新启动 Exchange 2010 服务器上的信息存储 (IS) 。If for any reason the migration batch file does not finalize (the PublicFolderMigrationComplete property value is False) restart the Information Store (IS) on the Exchange 2010 server.

第 8 步:测试和解除锁定公用文件夹迁移Step 8: Test and unlock the public folder migration

完成公用文件夹迁移之后,应运行以下测试,以确保迁移成功。这样,便能够在改为使用 Exchange 2016 公用文件夹之前测试迁移的公用文件夹层次结构。After you finalize the public folder migration, you should run the following test to make sure that the migration was successful. This allows you to test the migrated public folder hierarchy before you switch to using Exchange 2016 public folders.

  1. 在 PowerShell 中运行以下命令,指定一些测试邮箱将任一新迁移的公用文件夹邮箱用作默认公用文件夹邮箱。In PowerShell, run the following command to assign some test mailboxes to use any newly migrated public folder mailbox as the default public folder mailbox.

    Set-Mailbox -Identity <Test User> -DefaultPublicFolderMailbox <Public Folder Mailbox Identity>
    
  2. 使用上一步中确定的测试用户登录 Outlook 2007 或更高版本,然后执行以下公用文件夹测试:Log on to Outlook 2007 or later with the test user identified in the previous step, and then perform the following public folder tests:

    • 查看层次结构。View the hierarchy.

    • 检查权限。Check permissions.

    • 创建和删除公用文件夹。Create and delete public folders.

    • 在公用文件夹中发布内容以及从中删除内容。Post content to and delete content from a public folder.

  3. 如果您遇到任何问题,请参阅本主题后面的回滚迁移。如果公用文件夹的内容和层次结构可接受并按预期方式工作,运行以下命令,为所有其他用户解锁公用文件夹。If you run into any issues, see Roll back the migration later in this topic. If the public folder content and hierarchy is acceptable and functions as expected, run the following command to unlock the public folders for all other users.

    Get-Mailbox -PublicFolder | Set-Mailbox -PublicFolder -IsExcludedFromServingHierarchy $false
    

    重要

    完成初始迁移验证后,请勿使用 IsExcludedFromServingHierarchy 参数,因为 Exchange Online 的自动存储管理服务使用此参数。Don't use the IsExcludedFromServingHierarchy parameter after initial migration validation is complete as this parameter is used by the automated storage management service for Exchange Online.

  4. 在 Exchange 2010 服务器上,运行以下命令以指示公用文件夹迁移已完成:On the Exchange 2010 server, run the following command to indicate that the public folder migration is complete:

    Set-OrganizationConfig -PublicFolderMigrationComplete:$true
    
  5. 确认迁移完成后,请在 Exchange 2016 服务器上运行以下命令:After you've verified that the migration is complete, on the Exchange 2016 server, run the following command:

    Set-OrganizationConfig -PublicFoldersEnabled Local
    
  6. 最后,如果你想要让外部发件人向迁移的已启用邮件功能的公用文件夹发送邮件,则至少需要向" 匿名"用户授予" 创建项目"权限。如果不执行此操作,外部发件人将收到一封传递失败通知,邮件将不会传递到迁移的已启用邮件功能的公用文件夹。Finally, if you want external senders to send mail to the migrated mail-enabled public folders, the Anonymous user needs to be granted at least the Create Items permission. If you don't do this, external senders will receive a delivery failure notification and the messages won't be delivered to the migrated mail-enabled public folder.

    可以使用 Exchange 命令行管理程序 或 Outlook 设置匿名用户的权限。You can use the Exchange Management Shell or Outlook to set the permissions on the Anonymous user. 要了解如何设置匿名用户的权限,请参阅对公用文件夹启用或禁用邮件To read more about how to set permissions on the Anonymous user, see Mail-enable or mail-disable a public folder.

我如何知道这有效?How do I know this worked?

Step 2: Prepare for the migration中,我们建议您在开始迁移前先获取公用文件夹结构、统计信息和权限的快照。以下步骤会帮助您在迁移完成后获取相同的快照,以验证公用文件夹迁移是否成功。然后,您可以通过比较这两个文件中的数据来验证迁移是否成功。In Step 2: Prepare for the migration, you were instructed to take snapshots of the public folder structure, statistics, and permissions before the migration began. The following steps will help verify that your public folder migration was successful by taking the same snapshots after the migration is complete. You can then compare the data in both files to verify success.

  1. 运行以下命令,获取新文件夹结构的快照。Run the following command to take a snapshot of the new folder structure.

    Get-PublicFolder -Recurse | Export-CliXML C:\PFMigration\Cloud_PFStructure.xml
    
  2. 运行以下命令,获取公用文件夹统计信息(如项目计数、大小和所有者)的快照:Run the following command to take a snapshot of the public folder statistics such as item count, size, and owner.

    Get-PublicFolderStatistics -ResultSize Unlimited | Export-CliXML C:\PFMigration\Cloud_PFStatistics.xml
    
  3. 运行以下命令,获取权限的快照。Run the following command to take a snapshot of the permissions.

    Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML  C:\PFMigration\Cloud_PFPerms.xml
    

从 Exchange 2010 服务器中删除公用文件夹数据库Remove public folder databases from the Exchange 2010 servers

迁移完成后,且已验证 Exchange 2016 公用文件夹是否正常工作,应删除 Exchange 2010 服务器上公用文件夹数据库。After the migration is complete, and you have verified that your Exchange 2016 public folders are working as expected, you should remove the public folder databases on the Exchange 2010 servers.

若要详细了解如何从 Exchange 2010 服务器中删除公用文件夹数据库,请参阅删除公用文件夹数据库For details about how to remove public folder databases from Exchange 2010 servers, see Remove Public Folder Databases.

回滚迁移Roll back the migration

如果您在迁移时遇到问题,并且需要重新激活 Exchange 2010 公用文件夹,请执行以下步骤。If you run into issues with the migration and need to reactivate your Exchange 2010 public folders, perform the following steps.

注意

如果将迁移回滚到 Exchange 2010 服务器,将会丢失发送到已启用邮件的公用文件夹的任何电子邮件,或在迁移后发送到 Exchange 2016 中的公用文件夹的内容。If you roll your migration back to the Exchange 2010 servers, you will lose any email that was sent to mail-enabled public folders or content that was posted to public folders in Exchange 2016 after the migration. 若要保存此内容,您需要将公用文件夹内容导出到 .pst 文件,然后在回滚完成后将其导入 Exchange 2010 公用文件夹。To save this content, you need to export the public folder content to a .pst file and then import it to the Exchange 2010 public folders when the rollback is complete.

  1. 在 Exchange 2010 服务器上,运行以下命令来解锁迁移的公用文件夹。On the Exchange 2010 server, run the following command to unlock the migrated public folders. 此进程可能需要几个小时才会完成。This process may take several hours.

    Set-OrganizationConfig -PublicFoldersLockedForMigration $false
    
  2. 在 Exchange 2016 服务器中,运行以下命令,删除公用文件夹邮箱。On the Exchange 2016 server, run the following commands to remove the public folder mailboxes.

    Get-Mailbox -PublicFolder | Where {$_.IsRootPublicFolderMailbox -eq $false} | Remove-Mailbox -PublicFolder -Force -Permanent $true -Confirm:$false
    
    Get-Mailbox -PublicFolder | Remove-Mailbox -PublicFolder -Force -Permanent $true -Confirm:$false
    
  3. 在 Exchange 2010 服务器上,运行以下命令将 PublicFolderMigrationComplete 属性值设置为 FalseOn the Exchange 2010 server, run the following command to set the PublicFolderMigrationComplete property value to False.

    Set-OrganizationConfig -PublicFolderMigrationComplete $false
    
  4. 在 Exchange 2016 服务器上,运行以下命令以删除公用文件夹邮箱。On the Exchange 2016 server, run the following command to remove the public folder mailboxes.

    Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes <ProxyMailbox1>,<ProxyMailbox2>,...,<ProxyMailboxN>
    

    有关必须用于此命令的远程公用文件夹邮箱详细信息,请参阅在 Exchange 2013服务器上配置用户邮箱位于的旧公用文件夹。For more information about the remote Public Folder mailboxes you must use with this command, see Configure legacy public folders where user mailboxes are on Exchange 2013 servers.