Migrating Public Folders to 2013 from 2010

So, you’ve installed your shiny new Exchange 2013 Server into your Exchange Org. Now you need to get it prepped for your users to migrate and you want to get a copy of your Public Folder data over to 2013. How do you do this since Public Folder replication is no longer an option?

Public Folder Migration method from Microsoft

    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:


First we need to download the four PowerShell files from Microsoft.

  • Export-PublicFolderStatistics.ps1
  • Export-PublicFolderStatistics.strings.psd1
  • PublicFolderToMailboxMapGenerator.ps1
  • PublicFolderToMailboxMapGenerator.strings.psd1


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.


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.


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.


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.


In this step we will lock the Public Folders for the cutover to Exchange Server 2013 Public Folders:

  • Set-OrganizationConfig -PublicFoldersLockedForMigration:$true


This step will finalize the Public Folder Migration:

  • Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$false

  • Resume-PublicFolderMigrationRequest -Identity \PublicFolderMigration


In this step we will point some test accounts to the newly migrated public folders:

  • Set-Mailbox -Identity bober -DefaultPublicFolderMailbox PublicFolders

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
    From the Exchange 2010 server:

  • Set-OrganizationConfig -PublicFolderMigrationComplete:$true

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


7 thoughts on “Migrating Public Folders to 2013 from 2010

  1. I’m having trouble with what should be a simple 10 folder 100mb PF migration. The migration appears to go perfectly into a single new PF mailbox and Autosuspend at 95 percent as it’s supposed to. If I look in EAC I still see no public folders at all. (Is that a problem?)

    At that point I attempt to assign a user to the new PFs to test using the above command:

    •Set-Mailbox -Identity (mailboxname) -DefaultPublicFolderMailbox (new PF)

    however if I use the get-mailbox command to view what the DefaultPublicFolderMailbox is set to it’s already set to the new PF. If I look at that setting for other users it appears to be already set to the new PF mailbox name. Odd.

    However, here’s the kicker, if I open outlook for any user including the test user that I manually set the default for I can access public folders just fine, yes, but if I look in the connections window for Outlook it’s still connected to the old server for public folders. It’s like the DefaultPublicFolderMailbox command is either ignored or i’m thinking something is wrong with the migration that it doesn’t actually create any folders in the public folders tab in EAC.

    If I check the size of the public folder mailbox it looks like the 100mb is used and the command to get all the statistics of the migration looks like it successfully migrated 100mb data.

    There are no errors that I can see.


    • “If I look in EAC I still see no public folders at all. (Is that a problem?)”

      No, because you have not completed the migration yet. When you do, you will cut off access to the old folders and reveal the Exchange 2013 folder structure to your users. At that point it will be visible to PowerShell and the EAC.

      “however if I use the get-mailbox command to view what the DefaultPublicFolderMailbox is set to it’s already set to the new PF.”

      I can’t say exactly when this step gets set. However, if you read this article from Microsoft – http://technet.microsoft.com/en-us/library/jj150538(v=exchg.150).aspx – it appears that if the ‘IsHierarchyRead” is set to $false, the ‘DefaultPublicFolderMailbox’ parameter will be used.

      “but if I look in the connections window for Outlook it’s still connected to the old server for public folders.”
      My understanding is that there should be a connection to the Exchange 2013 server for Public Folders. See this article for screenshot of what it should look like – http://www.msexchange.org/articles-tutorials/exchange-server-2013/migration-deployment/migrating-public-folders-exchange-2013-part2.html.

      I would perform these steps:
      1) Remove the values from the ‘DefaultPublicFolderMailbox’ setting from all users.
      2) Run ‘Get-OrganizationConfig | ft publicfolder*’. See if ‘PublicFolderMigrationComplete’ or ‘PublicFoldersLockedForMigration’ is set to True.
      3) The run ‘Get-Mailbox -PublicFolder’ and see if any mailboxes are listed.
      4) Then set one mailbox’s DefaultPublicFolderMailbox parameter for the Exchange 2013 server.

      Then test again to see what happens. For more information on any roll back steps, reference this article “Migrate public folders to Exchange 2013 from previous versions” – http://technet.microsoft.com/en-us/library/jj150486(v=exchg.150).aspx.

  2. At what point if ever do you set PublicFoldersLockedForMigration back to $false after the migration is complete, or do you leave them permanently locked?

  3. I know this post is over 3 years old, but perhaps you could help me understand something. My organization has a total of 433 public folders, some of which are subfolders of others. I had assumed that when I ran the PublicFolderToMailboxMapGenerator.ps1 script against the csv of our 433 public folder names and their sizes that I would receive a file containing one row for every public folder, showing which mailbox it should be mapped to, or at the very least, a map of every parent public folder, but that doesn’t seem to be the case. Instead, I get a csv with just a few entries.

    Was my assumption incorrect, or am I running into an actual problem here?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s