Public Folder Migration method from Microsoft
http://technet.microsoft.com/en-us/library/jj150486%28v=exchg.150%29.aspx
-
Step 1: Download the migration scripts
Step 2: Prepare for the migration
Step 3: Generate the .csv files
Step 4: Create the public folder mailboxes on the Exchange 2013 server
Step 5: Start the migration request
Step 6: Lock down the public folders on the legacy Exchange server for final migration (downtime required)
Step 7: Finalize the public folder migration (downtime required)
Step 8: Test and unlock the public folder migration
Migration in Production
Here is what a real production migration looks like, step by step:
STEP ONE
First we need to download the four PowerShell files from Microsoft.
- Export-PublicFolderStatistics.ps1
- Export-PublicFolderStatistics.strings.psd1
- PublicFolderToMailboxMapGenerator.ps1
- PublicFolderToMailboxMapGenerator.strings.psd1
STEP TWO
On the Exchange 2010 server, run these three PowerShell commands:
- Get-PublicFolder -Recurse | Export-CliXML C:\PF\Legacy_PFStructure.xml
- Get-PublicFolderStatistics | Export-CliXML C:\PF\Legacy_PFStatistics.xml
- Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML C:\downloads\PF\Legacy_PFPerms.xml
These scripts will gather some information on your current Public Folder structures. Next, you need to check for folders that have “\” in the names as this will cause an issue during the migration.
- Get-PublicFolderStatistics -ResultSize Unlimited | Where {$_.Name -like “*\*”} | Format-List Name, Identity
If any folders are found with a “\” in the name, then rename them with this command:
- Set-PublicFolder -Identity “old folder name” -Name “new folder name”
Next we need to check for any existing migrations:
Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete
Then we need to remove any existing migrations, if there was one found with this command:
Set-OrganizationConfig -PublicFoldersLockedforMigration:$false -PublicFolderMigrationComplete:$false
-
Then we check for any existing migration requests:
- Get-PublicFolderMigrationRequest | Remove-PublicFolderMigrationRequest -Confirm:$false
Double check that no Public Folders exist on Exchange 2013:
- Get-Mailbox -PublicFolder
- Get-PublicFolder
For a typical migration no Public Folders will be found with these commands. If they are, they can be removed with these steps:
- Get-MailPublicFolder | where $_.EntryId -ne $null | Disable-MailPublicFolder -Confirm:$false
- Get-PublicFolder -GetChildren \ | Remove-PublicFolder -Recurse -Confirm:$false
- Get-Mailbox -PublicFolder |Remove-Mailbox -PublicFolder -Confirm:$false
In my case we had no exiting migrations and thus skipped that step.
STEP THREE
In this step we will generate some CSV files to be used in creating your Public folder structure:
- .\Export-PublicFolderStatistics.ps1 c:\downloads\pf\foldertosizemap.csv Exchangeserver2
- .\PublicFolderToMailboxMapGenerator.ps1 10000000000 c:\downloads\pf\foldertosizemap.csv c:\downloads\pf\Foldertomailboxmap.csv
The first script will simply get the sizes of your Public Folders and save the information into the CSV you specify. The second script will determine how many Public Folder mailboxes you need based on the maximum mailbox size you determine In the case of my script above, I chose to set 10,000,000,000 bytes as the maximum size.
STEP FOUR
Now we are ready to begin migrating your folders from 2010 to 2013. Since the new Public Folders are mailbox based, we need to create a mailbox or mailboxes for the existing Public Folder content to be replicated to. To do this, run this PowerShell command:
- New-Mailbox -PublicFolder -HoldForMigration:$true
If you know that you need more than one Mailbox, then you can run this script which will reference one of the CSV files you created in the previous steps:
$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{NewMailbox-PublicFolder $PFMailboxName -IsExcludedFromServingHierarchy:$true} }
Notice that the above script creates 25 mailboxes for Public Folders. You can review the CSV files you generated in Step 3 to see how many mailboxes you create. Also, change the scripts naming conventions to what you want for your Public Folder mailboxes before you run it.
STEP FIVE
Now we have all the prep work done on Exchange 2010 and you’ve created your Public Folder mailboxes, we can kick off a new Public Folder Migration request:
- New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server ) -CSVData (Get-Content -Encoding Byte)
To get more information on the Public Folder Migration Request, use this PowerShell command:
- Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | format-list
As you can see from the screenshot, the request is currently queued and has a Sync Stage of none. A more compact view of most of that information can be produced with:
- Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | ft name,status*,sync*,estimat*,percentcomplete -auto
After a bit of time the migration should begin progressing forward with copying of Public Folders. In the screenshot below the migration shows as 25%:
As the migration is progressing it is good to check to make sure it has not failed and that the data transfer is occurring at a reasonable speed. In the below screenshot you can see the rate of transfer as well as the total data moved.
When the migration gets to nearly complete, the migration will show as ‘Reliquished’ as you can see below:
The next stage would be “Autosuspended” which means the migration is ready for the final cutover:
Now that your migration is in the Autosuspended stage you can either move the Public Folders over immediately or wait until your scheduled time for the migration to complete. Depending on how long you wait, you may need to run ‘Resume-PublicFolderMigrationRequest \PublicFolderMigration’ to make sure no new content is missed.
STEP SIX
In this step we will lock the Public Folders for the cutover to Exchange Server 2013 Public Folders:
STEP SEVEN
This step will finalize the Public Folder Migration:
- Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$false
- Resume-PublicFolderMigrationRequest -Identity \PublicFolderMigration
STEP EIGHT
In this step we will point some test accounts to the newly migrated public folders:
Use this test account to see if the newly created public folders have been created successfully. If everything is good to go, run these two PowerShell commands:
- Get-Mailbox -PublicFolder | Set-Mailbox -PublicFolder -IsExcludedFromServingHierarchy $false
- Set-OrganizationConfig -PublicFolderMigrationComplete:$true
From the Exchange 2010 server:
Final checks on the migration status might show various messages until complete:
Once the migration is complete and Exchange 2013 is the hosting server for Public Folder content, you should see something like this:
and this:
Last, but not least, the Public Folders are now available to be managed in the EAC:
In my next article I will cover some troubleshooting steps that you can take if you have issues with your Public Folder migration.
Related Resources
http://technet.microsoft.com/en-us/library/jj150486%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218636%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218718%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218625%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218689%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218635%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218697%28v=exchg.150%29.aspx
http://technet.microsoft.com/en-us/library/jj218705%28v=exchg.150%29.aspx