Step 1 :下载需要的公共文件夹迁移脚本DownloadingRequired PF migration Scripts
=====
登录Exchange2010�C
Download the PF migration Scripts
Step 2: 备份Exchange2010公共文件夹架构
=====
备份PF文件夹, 项和权限架构,对公共文件夹数据库进行完全备份.
备份公共文件夹架构
Get-PublicFolder -Recurse | Export-CliXMLC:\PFMigration\Legacy_PFStructure.xml
备份公共文件夹项架构
Get-PublicFolderStatistics | Export-CliXMLC:\PFMigration\Legacy_PFStatistics.xml
备份公共文件夹权限架构
Get-PublicFolder -Recurse |Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandPropertyAccessRights | Export-CliXML C:\PFMigration\Legacy_PFPerms.xml
Step 3: 在Exchange2010上,去除PF名中的不支持的符号
=====
确保公共文件夹名中不包含反斜线“\”.
Get-PublicFolderStatistics -ResultSize Unlimited| Where {$_.Name -like “*\*”} | Format-List Name, Identity
如果存在,去掉反斜线“\”
注:如果公用文件夹的名称包含反斜线\,将在父公用文件夹中创建该公用文件夹。我们建议您查看 .csv 文件并编辑任何包含反斜线的名称。
Step 4: 在Exchange2013中,移除现有的迁移请求和任何公共文件夹
=====
确保没有公共文件夹迁移请求存在
Get-PublicFolderMigrationRequest
如果有,请移除
Get-PublicFolderMigrationRequest |Remove-PublicFolderMigrationRequest -Confirm:$false
确保在Exchange2013上没有公共文件夹邮箱和文件夹
Get-Mailbox �CPublicFolder
Get-PublicFolder
移除Exchange2013上的公共文件夹邮箱和PF文件夹,可以运行一下命令
Get-Mailbox -PublicFolder |Where{$_.IsRootPublicFolderMailbox -eq $false} | Remove-Mailbox -PublicFolder-Force -Confirm:$false
Get-Mailbox -PublicFolder | Remove-Mailbox-PublicFolder -Force -Confirm:$false
Step 5: 确保公共文件夹在Exchange2010中没有被锁定
=====
确保PublicFoldersLockedforMigration,PublicFolderMigrationComplete 被设为$false
Get-OrganizationConfig | Format-ListPublicFoldersLockedforMigration, PublicFolderMigrationComplete
Step 6: 在Exchange2010中创建Foldertosize映射文件
Run the Script �C
=====
.\Export-PublicFolderStatistics.ps1Foldertosize.csv mailboxserver.contoso.com
For Example �C
.\Export-PublicFolderStatistics.ps1Foldertosize.csv exch2010.contoso.com
Step 7: 在Exchange2010中创建public-folder-to-mailbox映射文件
Run the Script
=====
.\PublicFolderToMailboxMapGenerator.ps1<Maximum mailbox size in bytes> <Folder to size map path><Folder to mailbox map path>
For Example �C Taking 25 Gb into bytes
.\PublicFolderToMailboxMapGenerator.ps126843545600 Foldertosize.csv public-folder-to-mailbox.csv
Step 8: 预估所需要的公共文件夹邮箱的数量,并创建
=====
打开public-folder-to-mailbox.csv文件, 它将显示你将需要多少邮箱.
使用以下命令行来批量创建25个邮箱
$numberOfMailboxes = 25;
for($index =1 ; $index -le $numberOfMailboxes; $index++)
{
$PFMailboxName = “Mailbox”+$index;
if($index -eq 1)
{
New-Mailbox -PublicFolder $PFMailboxName-HoldForMigration:$true -IsExcludedFromServingHiearchy:$true;
}
else
{
New-Mailbox -PublicFolder $PFMailboxName-IsExcludedFromServingHierarchy:$true
}
}
登录到Exchange2013服务器
可以使用以下命令来创建“PFMailbox”公共文件夹
New-Mailbox -PublicFolder PFMailbox-HoldForMigration:$true
打开public-folder-to-mailbox.csv文件,修改为你创建的公共文件夹邮箱名“PFMailbox”.
并复制该csv文件到Exchange2013文件夹的根目录c:\.
Step 9: 迁移PF文件夹
=====
New-PublicFolderMigrationRequest-SourceDatabase (Get-PublicFolderDatabase -Server <Source server name>)-CSVData (Get-Content <Folder to mailbox map path> -Encoding Byte)
==
如果你遇到损坏想,你可以添加“ -AcceptLargeDataLoss �CBadItemLimit “ 属性.
例如�C
New-PublicFolderMigrationRequest-SourceDatabase (Get-PublicFolderDatabase -Serverexch2010.testcareexchange.biz) -CSVData (Get-ContentC:\public-folder-to-mailbox.csv -Encoding Byte)
查看迁移请求的状态,您可以运行一下命令
Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics-IncludeReport | fl
如果完成,它将显示“AutoSuspended”
Step 10: 锁定公共文件夹以完成最好的公布 (该过程期间将不能使用公共文件夹)
=====
登录Exchange2010服务器
Set-OrganizationConfig�CPublicFoldersLockedForMigration:$true
Step 11: 恢复到公共文件夹迁移来完成迁移.
=====
Set-PublicFolderMigrationRequest -Identity\PublicFolderMigration-PreventCompletion:$false
Resume-PublicFolderMigrationRequest -Identity\PublicFolderMigration
查看状态�C
Get-PublicFolderMigrationRequest |Get-PublicFolderMigrationRequestStatistics -IncludeReport | fl
如果有人在访问公共文件夹,或者任何代理错误,或者任何活动模块,它将会定期尝试.
现在它看起来完成了
Step 12: 测试PF迁移状态
=====
在一个测试邮箱上测试公共文件夹
添加公共文件夹邮箱
Step 13:
=====
运行
Get-Mailbox -PublicFolder | Set-Mailbox-PublicFolder -IsExcludedFromServingHierarchy $false
Step 14:
=====
一旦完成,在Exchange2010服务器上,设置PublicFolderMigrationComplete为$true.
Set-OrganizationConfig-PublicFolderMigrationComplete:$true
Step 15:
=====
移除Exchange2010 公共文件夹数据库