How to migrate on-premises public folders to Microsoft 365 in a hybrid environment
Your organization uses on-premises Exchange public folders in a hybrid deployment. You would like to know how to migrate their content to the cloud using CodeTwo Migration for Office 365.
To allow Exchange Online to access on-premises public folders you had to change their mode to Remote (as per this Microsoft article). However, doing so makes it impossible to create public folders in Microsoft 365 or migrate them to the cloud.
As a workaround, you need to change the mode of your on-premises public folders from Remote to Local. Once you complete this step, you will be able to create public folders in Microsoft 365. This operation is necessary because on-premises public folders migration is not possible if no public folder mailbox exists in the target Microsoft 365 tenant.
Keep in mind that changing the mode from Remote to Local may make you unable to connect to the on-premises public folders from your cloud environment. That’s why we recommend that you complete the procedure below only if you plan to move your public folders to the cloud and stop using them in your on-premises environment after the migration!
Follow the steps below to prepare your environment and perform the migration:
- Change the on-premises public folders mode to Local
- Configure target public folders in Microsoft 365
- Perform the migration
- Complete post-migration cleanup
- First, verify if you’re using your on-premises public folders in the Remote mode. To this end, launch the PowerShell console and execute the following command:
Get-OrganizationConfig |fl *public*
You should get the results looking like the ones presented in Fig. 1. The value for the PublicFoldersEnabled parameter tells you what mode your public folders are in.
- Now, it’s time to change the mode to Local. To do it, use the following command:
Set-OrganizationConfig -PublicFoldersEnabled Local -RemotePublicFolderMailboxes $Null
On executing this command, connection to public folders from your cloud environment gets broken.
To confirm the command has been effectively executed, use the same command as in step 1 above. Now, you should get the following results:
- Log in to the Exchange admin center, and enable public folders in your target Microsoft 365 environment, as described in this article.
When configuring the Root permissions for your public folders in the target environment, remember to use the same admin account that you will use in CodeTwo Office 365 Migration to connect to the target Microsoft 365 tenant.
Keep in mind that the propagation of a newly created public folder mailbox may take some time (even up to a few hours). Take this aspect into account when completing the next steps of this procedure.
- Now, set the newly created public folder mailbox as the default one for your admin account by using the following command:
Set-Mailbox -Identity <YourAdminAccount> -DefaultPublicFolderMailbox <YourPublicFolderMailboxName>
where YourAdminAccount specifies the mailbox of your admin account and <YourPublicFolderMailboxName> – the name of your public folders mailbox.
- Verify that the command has been successfully executed by using the following cmdlet:
Get-Mailbox | fl PrimarySmtpAddress,DefaultPublicFolderMailbox,EffectivePublicFolderMailbox
You should get similar results as shown in Fig. 3. (of course, data on the right may differ depending on what mailbox name you defined, your domain name, etc.):
Since there’s a risk that your Microsoft 365 users may no longer be able to access on-premises public folders due to changing their mode to Local, we recommend that you migrate them in a staged fashion to avoid any major disruptions in accessing the data. For example, you can migrate public folders’ data that is not older than 30 days in the first (shorter) stage. Then, during the second stage, migrate the remaining, older data out of your organization’s working hours. Learn more about staged migration
Below you will find a general description of the migration process. For a comprehensive instruction, refer to this article.
- Launch the program and create a new job to migrate your on-premises public folders to your cloud.
If CodeTwo software is unable to list target public folders, it may mean that they haven’t been properly propagated yet. To learn about other possible causes and solutions, consult this article.
- Use the Automatch feature to match source public folders mailbox to the target one (all public folders will be migrated). Alternatively, match the mailboxes manually. Learn more
- If you’ve decided on the staged migration to minimize disruptions in the access to public folders’ data, configure settings in the Time filter step of the migration job wizard, as described here.
- Run the job and wait until it has finished.
- After successful migration, you should be able to see your public folders when you click Public folders in the left-hand navigation menu of the Exchange admin center.
- To additionally verify that the migration has completed successfully, you can try to add a chosen public folder to favorites in the Outlook web app (OWA). To do so, log in to OWA with your admin credentials, right-click Folders in the left-hand menu, and choose Add public folder to Favorites (Fig. 4.). If the migration succeeded, you should be able to select and add any of your folders.
- (Optional) In the case of the staged migration, reconfigure the migration job and run it once again as described in the Second stage of the migration section here.
If you plan to use public folders in your Microsoft 365 cloud only, what you need to do now is to:
- for your Microsoft 365 users, set the appropriate public folder mailbox as the default one in Microsoft 365 (as shown in this step) and configure appropriate permissions;
- decommission (delete) the local (on-premises) public folders.
If you would like to keep using on-premises public folders and allow certain Microsoft 365 users access them, you can try to restore connection to them with the following command:
Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes <OnPremisesPFMailboxes>
where <OnPremisesPFMailboxes> should be replaced with comma-separated PF mailboxes’ names.
However, bear in mind that we cannot guarantee you will be able to complete this operation successfully.