How to Migrate Exchange 2013, 2016, 2019 Public Folders to Office 365?

How to Migrate Exchange 2013, 2016, 2019 Public Folders to Office 365?

Public folders are one of the major constituents of Exchange database. During user-migration from on-premises Exchange to Office 365, administrators need to transfer user mailbox data and public folders. This blog post highlights the three methods for migrating public folders in Exchange 2013, 2016, and 2019 and their comparison. Choose the best method as per requirement. 

Mailbox migration from on-premises Exchange server to Office 365 must also include migration of public folders. Reason being it contains important information related to workgroup, distribution list and the organization. However, a Public folder is a native mailbox of on-premises Exchange and is delegated as a folder in the assigned user mailbox. That’s the reason it has to be migrated separately and not with any specific mailbox, during a user migration from on-premises Exchange to Office 365.

The following methods can be used to migrate Exchange 2013, 2016, 2019 Public Folders to Office 365:

  1. Using PST export and migration
  2. Using specialized EDB to PST converter software such as Stellar Converter for EDB
  3. Using PowerShell scripts on Exchange on-premises and Exchange online

Let’s discuss the advantages and limitations of each method, which will help in deciding the best method for migration of public folders to Office 365, as per the requirement.

Comparison of the 3 Methods to Migrate Exchange 2013, 2016, 2019 Public Folders to Office 365

Methods

PST export and migration

Specialized software - Stellar Converter for EDB

PowerShell scripts on Exchange on-premises and Exchange online

Advantages

  • Manual process
  • Can be performed without third-party software
  • Simple three-step process: Select-Scan-Export
  • Migrates public folders from offline Exchange Server
  • Migrates public folder of all sizes
  • Less time taking. Time for migration depends upon the size of public folder

 

  • Manual process
  • Can be performed without third-party software

Limitations

  • Can be performed by Exchange administrators only as it requires extensive permissions on on-premises and online Exchange
  • On-premises public folder hierarchy should not exceed the size of 30 GB
  • Public folder permissions are lost when you export it to a PST file
  • Not successful in case of complex permissions and for exporting multiple public folders
  • Changes made to the source folder during PST export and migration are lost

 

  • Migrates all data of a public folder except permissions
  • Can be performed by Exchange administrators only as it requires extensive permissions on on-premises and online Exchange
  • Lengthy and extensive process
  • Process will not be completed in case of even a small change
  • No surety that the migration will be 100% successful even after performing all the steps 

Once you have decided the best method to migrate Exchange public folders to Office 365, click on the link below to check the steps of the selected method:

1. PST Export and Migration

Export public folder to PST:

  1. Open Outlook
  2. Click File and Open & Export, followed by Import/Export
  3. From Import and Export Wizard, select the option Export to a file followed by Next
  4. In Export to a file window, select Outlook Data File (.pst) and click Next
  5. In Export Outlook Data File window, select the public folder to export and click Next

Select the checkbox for Include Subfolders to include all subfolders of the selected public folder

  1. Browse and select a location where you want to export PST file
  2. Click Finish and public folder will be exported as PST file at specified location

Note: Not feasible for public folder for size >30 GB.

Migrate PST to Office 365:

  1. Download the migration script: ps1
  2. Create a CSV file and map source public folders to those on Office 365
  3. Create public folders on Office 365 based upon the mapping file
  4. Create top most public folder in each public folder mailboxes by using New-PublicFolder cmdlet
  5. Export PST files and import them on Office365 by using Outlook
  6. Assign public folder permissions with the help of Exchange Administration Center (EAC)

2. Migrate Public Folder by using Stellar Converter for EDB

  1. Download and Launch Stellar Converter for EDB software
  2. Select EDB file with public folders and click Next

The software will scan EDB file and preview it

  1. Select the checkbox for Public Folders that you want to export
  2. In the main menu, click Save
  3. From Save window, click Office 365 and provide user credentials

The software successfully migrates Exchange Public Folders 2013, 2016, 2019 to Office 365.

Note:

  • This is the easiest and fastest method of migrating Exchange public folders to Office 365.
  • Helps in migrating public folders from offline Exchange.
  • If you want to assign permissions while migration, use the following PowerShell cmdlet-based method.

3. Migrate Exchange Public Folders to Office 365 by using PowerShell Scripts

Office 365 is a suite of services offered by Microsoft and hosted within their own datacenters across the globe. This suite includes Exchange Online, so the methods for Exchange online are applicable to Office 365.

Note: Manual migration of modern public folder applies to Exchange 2013, 2016 and 2019 (Public folders till Exchange 2010 are called legacy public folders). Supports all versions of 2019, and requires Cumulative Update CU15 or later, in Exchange 2016, 2013 for on-premises environment.

Prerequisites for migrating public folder to Office 365:

  1. Take care that migration is performed in the same Active Directory forest and not a cross-forest migration.
  2. Take into account all limits and performance considerations of public folders.
  3. In Office 365, Exchange administrator must be a member of Organization Management role group. This permission is different from the one assigned during subscribing to Office 365.
  4. For migrating public folders from Exchange 2010 and later, Exchange administrator must be a member of Organization Management or Server Management RBAC role group.
  5. Check that the size of single public folder is no more than 25 GB. If the size exceeds 25 GB, either delete the content or divide the content into multiple small public folders.
  6. Ensure that the process of user migration is complete before migrating public folders.
  7. Ensure that the firewall permits the IP range used by Office 365 accounts.
  8. Verify that administrator is connected to Exchange online by using remote PowerShell.
  9. Migrate all public folders in a single batch as migration of multiple batches may result in error.
  10. In Active Directory (AD), ensure the following:
  11. No public folder mail objects are orphaned on AD
  12. SMTP email addresses are same for public folder on AD and Exchange objects
  13. There is no duplicate public folder in AD. No two AD objects must point to same mail-enabled public folder
  14. Ensure that there is enough bandwidth for Exchange Server downtime, as downtime is must to execute a few migration steps. At this time, public folders will remain inaccessible for usage.

Steps to Migrate Exchange Public Folder to Office 365

1. Download the scripts

Download the scripts and supporting files and save them locally on the computer on which you will run PowerShell cmdlet. These scripts are available on Microsoft online website for end users. Just visit (https://go.microsoft.com/fwlink/p/?linkid=844893) and are meant to sync, export and map modern public folder statistics.

2. Prepare Exchange for migration

Run Source Side Validation Script available on on-premises Exchange server. 

In Exchange Management Shell of on-premises Exchange Server, perform the following:

  • Direct DNS caches to send messages to mail-enabled public folders in their location at Office 365. To enable this on Office 365, configure a send connector by the Hybrid Configuration Wizard.
  • If the accepted domain name is already listed in on-premises Exchange, then rename it and take care not to change any other attribute.

Note: Backslash \ and forward slash / are not accepted during migration, so remove these characters from the name of public folders and rename them.

  • Check for any previous migrations and their status. If it returns with a value set as $true, then set its value as $false.

3. Take snapshots

To ensure that the migration process is complete and successful, take snapshots of current public folder deployment with the help of PowerShell cmdlets. These snapshots help in comparing with newly migrated public folders. Take snapshot of the following:

  1. Original source folder structure
  2. Public folder statistics such as its owner, item count, etc.
  3. Permissions
  4. Mail-enabled public folder

Save these snapshots at a safe place for comparing at the end of migration.

4. Remove all public folders in Office 365

Note: Ensure that the information contained in these folders is saved at a safe location. Once, you have removed all public folders, remove all public folder mailboxes.

Once the on-premises Exchange server is ready, perform the following steps on Office 365 or Exchange online PowerShell:

  • If any migration request is in pipeline, discover and remove any existing migration request.
  • Also, check if any public folder mailbox is available. However, this should not return with a positive result.
  • If there are any public folder mailboxes available, then remove them after checking for any saved information.
  • Next, run public folder mailboxes.

5. Generate CSV files

  • On Exchange Management Shell (EMS), run the script Export-ModernPublicFolderStatistics.ps1 to create folder name to folder size mapping file. This will also help in verifying the size of public folder to be exported.
  • Next, run the script: ps1 to create a .csv file that will map the source public folders in on-premises Exchange server to public folder mailboxes in Exchange Online destination. It also helps in calculating the total number of public folder mailboxes in Office 365.
  • The maximum mailbox size for a single folder in bytes is 50 GB. Assign a maximum of 50% size to the mailbox to ensure space for future growth.
  • It is recommended to keep the maximum size of recoverable items quota in public folder mailboxes to 15 GB or less.

Note: You cannot migrate more than 100 unique public folder mailboxes to Exchange online.

6. Create target public folder mailboxes on Exchange online

Create target public folder mailboxes that will contain migrated public folders. A detailed information of these folders is available in .csv file.

7. Start migration request

On on-premises environment and in Exchange Online, perform the following:

  • On Exchange 2016 or Exchange 2019 source servers, synchronize mail-enabled public folders from your local Active Directory to Exchange Online

Note:

  • Check that the downloaded script is of the latest version and run the script from Exchange Management Shell (EMS).
  • Use Exchange Online administrator user name and password as credentials.
  • Go to on-premises Exchange and open EMS. Locate GUID of the primary hierarchy mailbox. Check the output of this PowerShell command as it is required in the next step. In Exchange Online, create the public folder migration endpoint and the public folder migration mapping.
  • There is a possibility that map file has moved to a new location, then use the new location.
    Separate multiple mailbox addresses with commas
    Note: You may receive an error that states, a parameter cannot be found that matches parameter name 'SourcePfPrimaryMailboxGuid', then create the migration batch
  • Finally, start the migration process in Exchange Online PowerShell with the help of ‘Start-MigrationBatch PublicFolderMigration’ command
  • Before moving on to next step, lock the public folders on the Exchange on-premises server and verify that all data is copied without error
  • Once you have confirmed that the batch has moved to the state of Synced, prepare for the migration in the final step under Prerequisite steps in the Exchange Server on-premises environment, to take a snapshot of the public folders on-premises
  • Once these commands have run, you can proceed to the next step. These commands may take a little long to complete and depends on the number of folders. Every 24 hours, this migration process synchronizes the data from on-premises environment
  • You can monitor the migration process with the help of following requests:

Get-PublicFolderMailboxMigrationRequest

Get-PublicFolderMailboxMigrationRequestStatistics

Get-MigrationBatch

8. Lock the public folders on the Exchange on-premises server (requires public folder downtime)

Until this point in the migration process, users have been able to access on-premises public folders. The following steps will now log off users off from Exchange Server public folders and then lock the folders as the migration process completes its final synchronization. Users won't be able to access public folders during this time, and any messages sent to these mail-enabled public folders remain undelivered until the migration process is complete.

Note: The final sync may take some amount of time, depending on the following factors - changes in source environment, size of the deployed public folder, server capacity, etc. Therefore, schedule a minimum of 48 hours of downtime.

  • Ensure the migration batch and individual migration requests are synced.
  • The LastSyncedDate (on migration batch) and LastSuccessfulSyncTimestamp (on individual jobs) should be within the last 7 days. If the date is too far in the past, such as more than a month ago, you might want to review public folder migration requests and ensure that all the requests were synced recently.
  • After you have confirmed that the batch and all migration requests have successfully synced, in your on-premises environment, lock the Exchange Server public folders for finalization.

Note:

Sometimes, Active Directory may take more than the stipulated time. Then, there is no way you can access the -PublicFolderMailboxesLockedForNewConnections parameter, during the CU upgrade.

For organizations, having public folder mailboxes on multiple Exchange servers, wait until Active Directory replication is complete.

  • Once the process is complete, you can confirm that all public folder mailboxes have picked up the PublicFolderMailboxesLockedForNewConnections flag, and that any pending changes made to the public folders have converged across the organization. It may take several hours.

9. Final steps for public folder migration (requires public folder downtime)

  • Before final completion, check that there are no other public folder mailbox moves or public folder moves going on in your on-premises Exchange environment.
  • Re-run the following script to check if any new mail-enabled public folder is synchronized with Exchange Online:
    .\Sync-ModernMailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile:sync_summary.csv
  • Finally, complete the migration by running the ‘Complete-MigrationBatch PublicFolderMigration’ command in Exchange Online.

Note: There is no scope of data sync after the migration process is completed

  • When you run Complete-MigrationBatch PublicFolderMigration command, Exchange will perform a final synchronization between on-premises Exchange and Exchange Online. During this period, the status of the migration batch will change from Synced to Completing, and then finally to Completed.

10. Test and unlock public folders in Exchange Online

Perform the following steps to test the success of public folder migration. These final tasks allow you to test the migrated public folder hierarchy before you permanently switch to Office 365 public folders.

  • Go to Exchange Online PowerShell, configure a test user mailbox to use as newly migrated public folder mailbox as default.
  • Provide all necessary permissions to create public folders.
  • Log on to Outlook with the test user account and . Wait for 15 to 30 minutes for the changes to take effect. Once Outlook recognizes the changes, test the user account. It might prompt to start Outlook. Once done, check the following
    View folder hierarchy.
    b. Check permissions.
    c. Create and delete a few public folders.
    d. Post and delete content from a public folder.
  • In Exchange Online PowerShell, run the cmdlet to unlock public folders in Exchange Online. Wait for 15 to 30 minutes for the changes to take effect. Once Outlook recognizes the changes, it might prompt to start Outlook.

11. Finalize the migration on-premises

To enable emails to mail-enabled public folders on-premises, perform the following steps:

  • Take a backup of emails in the queue that were sent to mail-enabled public folders. This backup is useful when email delivery to mail-enabled public folders has failed.
  • On on-premises environment, ensure that the emails to mail-enabled public folders are routed to Exchange Online.
  • On on-premises environment, test that the public folder migration is successful and complete.

12. How to test that public folder content has migrated completely?

Compare the data with the previous snapshots to verify success. Go to Exchange Online and take the following snapshots for comparison:

  1. New folder structure
  2. Public folder statistics, including item count, size, and owner
  3. Permissions
  4. Mail-enabled public folders

Conclusion

This blogpost focuses on three methods of migrating Exchange 2013, 2016, 2019 public folders to Office 365 and their comparison. This comparison can act as a deciding factor for you to select the best method as per your requirement.

To summarize, migrating through PST export is a short method but it doesn’t migrate the folder permissions. Also, it migrates public folders of size less than 30 GB and doesn’t export multiple folders.

Stellar Converter for EDB helps Exchange administrators to export public folders when the Exchange Server is not accessible or available in offline state. Also, the software exports all EDB mailboxes to Office 365 or Exchange online account.

PowerShell script method is lengthy and involves server downtime, which may disrupt the business continuity. If your Exchange administrator team is looking to restore user mailbox data from locally saved offline folder file, then you can take assistance of OST to PST converter by Stellar.

This could interest you

Become a more social person