使用批处理迁移将公用文件夹从旧版本迁移到 Exchange 2013Use batch migration to migrate public folders to Exchange 2013 from previous versions

摘要: 本文介绍了如何将公用文件夹从 Exchange 2007 或 Exchange 2010 Exchange 2013。Summary: This article tells you how to move public folders from Exchange 2007 or Exchange 2010 to Exchange 2013.

本文介绍如何在同一林中将公用文件夹从 Exchange Server 2010 SP3 RU8 或 Exchange 2007 SP3 RU15 迁移到 Microsoft Exchange Server 2013 CU7 或更高版本。This article describes how to migrate your public folders from Exchange Server 2010 SP3 RU8 or Exchange 2007 SP3 RU15 to Microsoft Exchange Server 2013 CU7 or later within the same forest.

我们将 Exchange 2010 SP3 RU8 和 Exchange 2007 SP3 RU15 服务器视为旧 Exchange 服务器We refer to the Exchange 2010 SP3 RU8 and Exchange 2007 SP3 RU15 servers as the legacy Exchange server.

备注

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

您需要使用 *MigrationBatch cmdlet 执行迁移,并使用 *PublicFolderMigrationRequest cmdlet 进行故障排除。此外,您还会用到以下 PowerShell 脚本:You'll perform the migration by using the *MigrationBatch cmdlets, and the *PublicFolderMigrationRequest cmdlets for troubleshooting. In addition, you will 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 步:下载迁移脚本详细介绍了从何处可以下载这些脚本。请确保所有脚本都下载到相同的位置。Step 1: Download the migration scripts provides details about where to download these scripts. Make sure all scripts are downloaded to the same location.

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

将公用文件夹迁移到 Exchange 2013 的操作支持哪些 Exchange 版本?What versions of Exchange are supported for migrating public folders to Exchange 2013?

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 2007 SP3 RU15 或更高版本Exchange 2007 SP3 RU15 or later

如果需要将公用文件夹移动到 Exchange 2013,但本地服务器未运行 Exchange 2010 或 Exchange 2007 的最低支持版本,请查看使用串行迁移将公用文件夹从以前版本迁移到 Exchange 2013。If you need to move your public folders to Exchange 2013 but your on-premises servers aren't running the minimum support versions of Exchange 2010 or Exchange 2007, check out Use serial migration to migrate public folders to Exchange 2013 from previous versions. 虽然可以视需要使用串行迁移,但我们强烈建议升级本地服务器,并使用批处理迁移。While serial migration is an option, we strongly recommend that you upgrade your on-premises servers and use batch migration. 批处理迁移可实现显著更快、更高的可靠性。Batch migration allows for significantly faster and greater reliability.

您不能将公用文件夹直接从 Exchange 2003 迁移出来。You can't migrate public folders directly from Exchange 2003. 如果在组织中运行 Exchange 2003,则需要将所有公用文件夹数据库和副本移动到 Exchange 2010 SP3 RU8 或更高版本,或移动到 Exchange 2007 SP3 RU15 或更高版本。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, or to Exchange 2007 SP3 RU15 or later. 没有公用文件夹副本可以在 Exchange 2003 上保留。No public folder replicas can remain on Exchange 2003. 此外,发往 Exchange 2013 公用文件夹的邮件不能通过 Exchange 2003 服务器进行路由。Additionally, mail destined for an Exchange 2013 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.

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

  • 一次迁移中可迁移到 Exchange 2013 的公用文件夹的最大数量为 500,000。The maximum number of public folders that can be migrated to Exchange 2013 in a single migration is 500,000.

  • 在 Exchange 2013 中,您必须是组织管理角色组的成员。In Exchange 2013, 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.

  • 在 Exchange 2007 中,必须分配有 Exchange 组织管理员角色或 Exchange Server 管理员角色。此外,还必须分配有公用文件夹管理员角色和目标服务器的本地管理员组。有关详细信息,请参阅如何向管理员角色添加用户或组In Exchange 2007, you need to be assigned the Exchange Organization Administrator role or the Exchange Server Administrator role. In addition, you need to be assigned the Public Folder Administrator role and local Administrators group for the target server. For details, see How to Add a User or Group to an Administrator Role.

  • 在 Exchange 2007 服务器中,升级到 Windows Server 2008 x64 Edition 的 Windows PowerShell 2.0 和 WinRM 2.0On the Exchange 2007 server, upgrade to Windows PowerShell 2.0 and WinRM 2.0 for Windows Server 2008 x64 Edition.

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

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

  • 在多域环境中,如果启用了邮件的公用文件夹在子域中运行,那么在迁移到 Exchange 2013 Exchange将停止工作。In a multiple-domain environment, mail-enabled public folders will stop working after migration to Exchange 2013 if Exchange is running in a child domain. 这是因为在 2013 Exchange,启用邮件的公用文件夹对象必须位于根域下。This is because in Exchange 2013, 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 2013 服务器。Before you begin your migration, make sure you migrate your arbitration mailbox to the Exchange 2013 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.*).servername -eq (hostname))

步骤 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 的本地电脑。Save the scripts to the local computer on which you'll be running PowerShell. 例如 \ ,C:PFScripts。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 服务器的先决条件步骤Prerequisite steps on the legacy Exchange server

  1. 为了在迁移结束时进行验证,我们建议您先在旧版 Exchange 服务器上运行以下命令,获取当前公用文件夹部署的快照:For verification purposes at the end of migration, we recommend that you first run the following commands on the legacy Exchange 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 -ResultSize Unlimited | 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 -ResultSize Unlimited | Export-CliXML C:\PFMigration\Legacy_PFStatistics.xml
      
    • 运行以下命令,获取权限的快照:Run the following command to take a snapshot of the permissions:

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

    保存上述命令所生成的信息,以供在完成迁移后进行比较。Save the information from the preceding commands for comparison purposes after your migration is complete.

  2. 如果公用文件夹的名称包含反杠,将在迁移发生时在父公用 \ 文件夹中创建公用文件夹。If the name of a public folder contains a backslash \, the public folders will be created in the parent public folder when migration occurs. 在迁移之前,我们建议您为名称中包含反斜线的公用文件夹重命名。Before you migrate, we recommend that you rename any public folders that have a backslash in the name.

    1. 在 Exchange 2010 中,若要找到名称中包含反斜杠的公用文件夹,请运行以下命令:In Exchange 2010, to locate public folders 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
      
    2. 在 Exchange 2007 中,若要找到名称中包含反斜杠的公用文件夹,请运行以下命令:In Exchange 2007, to locate public folders that have a backslash in the name, run the following command:

      Get-PublicFolderDatabase | ForEach {Get-PublicFolderStatistics -Server $_.Server | Where {$_.Name -like "*\*"}}
      
    3. 如果返回任何公用文件夹,您可以通过使用以下命令对它们进行重命名: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 previous record of a successful migration.

    1. 下面的示例展示了如何检查公用文件夹的迁移状态。The following example checks the public folder migration status.

      Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete
      

      如果之前已成功迁移, 则 PublicFoldersLockedforMigrationPublicFolderMigrationComplete 属性的值为 $trueIf there has been a previous successful migration, the value of the PublicFoldersLockedforMigration or PublicFolderMigrationComplete properties is $true. 使用步骤 3b 中的命令将值设置为 $falseUse the command in step 3b to set the value to $false. 如果该值设置为 $true ,则迁移请求将失败。If the value is set to $true, your migration request will fail.

    2. 如果 PublicFoldersLockedforMigrationPublicFolderMigrationComplete 属性的状态为 ,请运行以下命令将 $true 值设置为 $falseIf the status of the PublicFoldersLockedforMigration or PublicFolderMigrationComplete properties is $true, run the following command to set the value 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 2013 服务器上的先决条件步骤Prerequisite steps on the Exchange 2013 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.

    现有的迁移请求可以是下列两种类型之一:批处理迁移或串行迁移。用于检测每种类型请求和删除每种类型请求的命令如下所示。An existing migration request can be one of two types: batch migration or serial migration. The commands for detecting requests for each type and for removing requests of each type are as follows.

    重要

    • 在删除迁移请求之前,了解为何存在现有迁移请求非常重要。• 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.

    • 支持公用文件夹的串行迁移 (* -PublicFolderMigrationRequest * cmdlet) 已于 Exchange 2013 年累积更新 8 (CU8) 结束。• Support for serial migration of public folders (*-PublicFolderMigrationRequest* cmdlets) ended in Exchange 2013 Cumulative Update 8 (CU8).

    下面的示例会发现任何现有的串行迁移请求。The following example will discover any existing serial migration requests.

    Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | Format-List
    

    下面的示例展示了如何删除任何现有的公用文件夹串行迁移请求。The following example removes any existing public folder serial migration requests.

    Get-PublicFolderMigrationRequest | Remove-PublicFolderMigrationRequest
    

    下面的示例会发现任何现有的批处理迁移请求。The following example will discover any existing batch migration requests.

    $batch = Get-MigrationBatch | ?{$_.MigrationType.ToString() -eq "PublicFolder"}
    

    下面的示例展示了如何删除任何现有的公用文件夹批处理迁移请求。The following example removes any existing public folder batch migration requests.

    $batch | Remove-MigrationBatch -Confirm:$false
    
  2. 确保 2013 服务器上不存在公用文件夹Exchange公用文件夹邮箱。Make sure no public folders or public folder mailboxes exist on the Exchange 2013 servers.

    1. 运行以下命令,检查是否有任何公用文件夹邮箱。Run the following command to see if any public folders mailboxes exist.

      Get-Mailbox -PublicFolder
      
    2. 如果此命令没有返回任何公用文件夹邮箱,请继续执行第 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
      
    3. 如果存在任何公用文件夹,请运行以下 PowerShell 命令将其删除。请确保您已保存公用文件夹中的所有信息。If you have any public folders, run the following PowerShell 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服务器上,运行脚本以创建文件夹 Export-PublicFolderStatistics.ps1 名称到文件夹大小的映射文件。On the legacy Exchange 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 文件的网络共享文件夹上的文件名称和路径。Folder to size map path equals the file name and path on a network shared folder where you want the .csv file saved. 在本主题的稍后部分,您需要从 Exchange 2013 服务器访问此文件。Later in this topic, you'll need to access this file from the Exchange 2013 server. 如果您仅指定文件名,则会在本地计算机上的当前 PowerShell 目录中生成此文件。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. 此文件用于计算 2013 邮箱服务器上公用文件夹Exchange数量。This file is used to calculate the correct number of public folder mailboxes on the Exchange 2013 Mailbox 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.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 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 2013 中创建公用文件夹邮箱Step 4: Create the public folder mailboxes in Exchange 2013

  1. 运行以下命令来创建目标公用文件夹邮箱。脚本将通过运行 PublicFoldertoMailboxMapGenerator.ps1 脚本,为您之前在步骤 3 中生成的 .csv 文件中的每个邮箱创建一个目标邮箱。Run the following command to create the target public folder mailboxes. 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 2007 公用文件夹的步骤与迁移 Exchange 2010 公用文件夹的步骤不同。The steps for migrating Exchange 2007 public folders are different from the steps for migrating Exchange 2010 public folders.

提示

无论是从 Exchange 2007 还是从 Exchange 2010 迁移,使用相应的 cmdlet 创建批处理迁移请求后,都可以在 EAC 中查看和管理请求。Whether migrating from Exchange 2007 or Exchange 2010, once batch migration requests are created with the appropriate cmdlet, you can then view the requests and manage them in the EAC.

迁移 Exchange 2007 公用文件夹Migrate Exchange 2007 public folders

  1. Exchange 2013 无法识别旧版系统公用文件夹(如 OWAScratchPad)和 Exchange 2007 中的架构根文件夹子树,因此将被视为"错误"项目。Legacy system public folders such as OWAScratchPad and the schema-root folder subtree in Exchange 2007 won't be recognized by Exchange 2013 and will therefore be treated as "bad" items. 这会导致迁移失败。This will cause the migration to fail. 作为迁移请求的一部分,必须为 参数指定 BadItemLimit 值。As part of the migration request, you must specify a value for the BadItemLimit parameter. 此值根据您拥有的公用文件夹数据库数量而有所不同。This value will vary depending on the number of public folder databases you have. 以下命令将确定您有多少公用文件夹数据库,并计算 BadItemLimit 迁移请求的 。The following commands will determine how many public folder databases you have and compute the BadItemLimit for the migration request.

    $PublicFolderDatabasesInOrg = @(Get-PublicFolderDatabase)
    
    $BadItemLimitCount = 5 + ($PublicFolderDatabasesInOrg.Count -1)
    
  2. 在 Exchange 2013 服务器上,运行以下命令:On the Exchange 2013 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> -BadItemLimit $BadItemLimitCount
    
  3. 使用以下命令启动迁移:Start the migration using the following command:

    Start-MigrationBatch PFMigration
    

迁移 Exchange 2010 公用文件夹Migrate Exchange 2010 public folders

  1. 在 Exchange 2013 服务器上,运行以下命令。On the Exchange 2013 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. 使用以下命令启动迁移:Start the migration using the following command:

    Start-MigrationBatch PFMigration
    

    或:Or:

    您可以在 EAC 中启动迁移。You can start the migration in the EAC.

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

    2. Navigate to Recipients > Migration.Navigate to Recipients > Migration.

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

The Status column will show the initial batch status as Created.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 中查看和管理迁移的进度和完成情况。因为 New-MigrationBatch cmdlet 可启动每个公用文件夹邮箱的邮箱迁移请求,所以您可以使用邮箱迁移页查看这些请求的状态。您可以转到邮箱迁移页,并通过执行以下操作,生成可以电子邮件方式发送给您的迁移报告:The progress and completion of the migration can be viewed and managed in the 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. You can get to the mailbox migration page, and create migration reports that can be emailed to you, by doing the following:

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

  2. Navigate to Mailbox > Migration.Navigate to Mailbox > Migration.

  3. Select the migration request that was just created and then click View Details in the Details pane.Select the migration request that was just created and then click View Details in the Details pane.

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

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

在迁移过程中的此步骤之前,用户都可以访问公用文件夹。后续步骤会将用户从旧版公用文件夹中注销,并锁定这些文件夹直到迁移完成最终同步时为止。在此过程中,用户无法访问公用文件夹。此外,发送到启用邮件的公用文件夹的任何邮件都会排队,并且在公用文件夹迁移完成前不会进行传递。Until this point in the migration, users have been able to access public folders. The next steps will log users off from the legacy 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 服务器中,运行以下命令锁定旧版公用文件夹,以便完成迁移。On the legacy Exchange server, run the following command to lock the legacy 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 flag 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 2013 部署类型更改为 RemoteFirst, run the following cmdlet to change the Exchange 2013 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

Or, in EAC, you can complete the migration by clicking Complete this migration batch.Or, in EAC, you can complete the migration by clicking Complete this migration batch.

备注

如果迁移批处理文件出于任何原因未最终完成 (PublicFolderMigrationComplete 显示 False) ,在旧版服务器上,重新启动信息存储 (IS) 。If for any reason the migration batch file does not finalize (PublicFolderMigrationComplete displays False), on the legacy server, restart the Information Store (IS).

When you complete the migration, Exchange will perform a final synchronization between the legacy Exchange server and Exchange 2013.When you complete the migration, Exchange will perform a final synchronization between the legacy Exchange server and Exchange 2013. 如果最终同步成功,Exchange 2013 服务器上公用文件夹将解锁,迁移批处理的状态将更改为"正在完成",然后更改为"已完成"。 If the final synchronization is successful, the public folders on the Exchange 2013 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.

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

完成公用文件夹迁移之后,您应该运行以下测试,确保迁移成功。这样便能够在转而使用 Exchange 2013 公用文件夹之前测试迁移的公用文件夹层次结构。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 2013 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 服务器中,运行以下命令,以指示公用文件夹迁移已完成:On the legacy Exchange server, run the following command to indicate that the public folder migration is complete:

    Set-OrganizationConfig -PublicFolderMigrationComplete:$true
    
  5. 验证迁移完成后,运行以下命令:After you've verified that the migration is complete, 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.

    可以使用命令行管理程序或 Outlook 设置匿名用户的权限。要了解如何设置匿名用户的权限,请参阅对公用文件夹启用或禁用邮件You can use the 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 -ResultSize Unlimited | 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 -ResultSize Unlimited | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML  C:\PFMigration\Cloud_PFPerms.xml
    

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

在迁移完成且您已验证 Exchange 2013 公用文件夹可按预期运行后,您应该删除旧版 Exchange 服务器中的公用文件夹数据库。After the migration is complete, and you have verified that your Exchange 2013 public folders are working as expected, you should remove the public folder databases on the legacy Exchange servers.

回滚迁移Roll back the migration

如果您在迁移过程中遇到问题,并且需要重新激活旧版 Exchange 公用文件夹,请按照下列步骤操作。If you run into issues with the migration and need to reactivate your legacy Exchange public folders, perform the following steps.

警告

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

  1. 在旧版 Exchange 服务器中,运行以下命令解锁旧版 Exchange 公用文件夹。此进程可能需要几个小时。On the legacy Exchange server, run the following command to unlock the legacy Exchange public folders. This process may take several hours.

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

    Get-Mailbox -PublicFolder | Where{$_.IsRootPublicFolderMailbox -eq $false} | Remove-Mailbox -PublicFolder -Force -Confirm:$false
    
    Get-Mailbox -PublicFolder | Remove-Mailbox -PublicFolder -Force -Confirm:$false
    
  3. 在旧版 Exchange服务器上,运行以下命令将 PublicFolderMigrationComplete 标志设置为 $falseOn the legacy Exchange server, run the following command to set the PublicFolderMigrationComplete flag to $false.

    Set-OrganizationConfig -PublicFolderMigrationComplete:$False