“Public Folders” – Did anybody just cringe when you read that? Well yes I agree as PF’s have been long the thorn in the Exchange Admins side. But they do have their usages and some users would tell you that their life depended on them, literally. When we get to the point of migration of these little nasties up to Office 365 well there are some trick involved.

Now, when I say “Legacy” in the title here, then this is referring to Exchange 2007 and 2010. The later versions on Exchange 2013, 2016 and 2019 are referred to as “Modern”. Therefore if you need the “Modern” version instead then the instructions are simpler and easier, and are in a separate article under Public Folders so check that out.

Generally when we start an Office 365 migration we are not immediately thinking about Public Folders. This article will show you how to map the users that are migrated to Office 365 back to the On Premises version so they can continue to work as usual. Remember that Public Folders cannot co-exist on both systems, they will need to be in just one place or the other. The easiest way is to map the users back to the On Premises servers and deal with the migration of them later on.

If we are still talking about the Exchange 2007 and 2010 versions though then read on. Now importantly Microsoft does offer a full solution to do all this. I can guide you to this article on the Microsoft site.

https://docs.microsoft.com/en-us/exchange/collaboration-exo/public-folders/set-up-legacy-hybrid-public-folders

Now feel free to run through the entire process with this link, I will just paraphrase and tell you what you actually need to do without any additional fluff around it. This may be a very simplistic view but this will get the job done.

1. For each Exchange 2010 server that has Public Folders you need to install the CAS role.

2. Create an empty mailbox database on each Public Folder server. This is for the Public Folder Proxy database so you may want to exclude it from the auto allocation of new user mailboxes.

New-MailboxDatabase -Server <PFServerName_with_CASRole> -Name <NewMDBforPFs> -IsExcludedFromProvisioning $true

3. Create a Proxy Mailbox within the new mailbox database.

New-Mailbox -Name <PFMailbox1> -Database <NewMDBforPFs>

Set-Mailbox -Identity <PFMailbox1> -HiddenFromAddressListsEnabled $true

4. For Exchange 2010 servers, enable AutoDiscover to return the proxy public folder mailboxes

Set-MailboxDatabase <NewMDBforPFs> -RPCClientAccessServer <PFServerName_with_CASRole>

5. Download the Mail Enabled Public Folder Scripts from the Microsoft site and save them in C:\Scripts on your Exchange Server.

https://www.microsoft.com/download/details.aspx?id=46381

6. Because the Directory Sync mechanism doesn’t sync mail enabled public folders, that’s what these scripts are for. Run them on your Exchange Server like this.

Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile “<sync_summary.csv>”

7. On Exchange Online configure the Office 365 system to talk back through the hybrid server with this command.

Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes PFMailbox1,PFMailbox2,PFMailbox3

And that is about it. In my experience it takes about an hour for the users in the Cloud to start seeing the Public Folders On Premises so don’t freak out when it is not immediately available. Just give it time and it will work out.