Deploying an Exchange 2013 Hybrid Lab Environment in Windows Azure (Part 29)

If you would like to read the other parts in this article series please go to:


In part 28 of this article series revolving around what the Windows Azure service is all about as well as how you deploy an Exchange hybrid deployment in Windows Azure, we took a look at the hybrid configuration settings configured by the hybrid configuration wizard in the Exchange Online organization in Office 365.

Let’s get going…

Modern Public Folder Overview

So one of the oldest features in Exchange Server is without question public folders with which Exchange administrators and consultants around the world often have had a love and hate relationship through the years. Since public folders was introduced with Exchange Server 4.0 at what seems like too many years ago (more precisely back in 1996!).

In a nutshell, public folders are designed for shared access and provide an easy and effective way to collect, organize, and share information with other people within the organization. They are provided as a hierarchy in the Exchange clients used by the end user. Public folders help organize content in a deep hierarchy that’s easy to browse. Users using an Exchange client supporting public folders (OWA, Outlook and Outlook for Mac) will be provided with a hierarchy of any existing public folders and have access based on the permissions set by the public folder owner or administrator.

Although public folders were deprecated back with the release of Exchange 2007, this decision was later reverted based on customer feedback.

With the release of Exchange 2013, public folders are no longer based on their own public folder databases. Instead, the public folder hierarchy and data is stored in mailboxes. The major benefit of this approach is that public folder data now are protected based on the same resilience feature set (aka DAG) as traditional user mailboxes. Despite this back-end change, the way in which public folders are presented to the end users have not changed.

Since a lot of organizations still demand public folders as a feature in their Exchange messaging infrastructure, Microsoft knew that they had to support this feature in Exchange Online in order for these organizations to move their messaging infrastructure to the cloud. And with the release of the Exchange 2013 on-premises product and the upgrade from wave 14 to wave 15 (2010 to 2013 in Office 365), Microsoft also began to support public folders in Exchange Online although with strict limitations in regards to the number and size of the public folder hierarchy. This has since changed and the latest limitations can be found in the Exchange Online limits documentation.

What’s Supported and What’s not?

There are some important details to bear in mind, when it comes to the supportability around providing access to and/or migrating public folders to Exchange Online.

First, we can configure public folder coexistence as in provide mailbox users in Exchange Online access to the public folders in the on-premises Exchange organization or provide mailbox users in the on-premises Exchange organization access to public folders in Exchange Online. For legacy Exchange (Exchange 2007/2010) on-premises organizations, there can even be mailbox users in both places. However, for Exchange 2013 all mailbox users that need to access public folders must be located in the same Exchange organization (on-premises or in EXO).

Migration of public folders from an on-premises Exchange organization to Exchange Online is only supported if dealing with a legacy Exchange on-premises organization as in Exchange 2007 or Exchange 2010 is used on-premises.

For Exchange 2013 on-premises, there is currently no supported public folder migration path to Exchange Online, but it is on the roadmap.

If you need to migrate Exchange 2013 based public folders to Exchange Online, you currently need to use a third party solution.

Configuring On-Premises Public Folder Access in Exchange Online

In this section, we will configure public folder coexistence as in provide mailbox users in Exchange Online access to the public folder hierarchy in the on-premises Exchange organization. By doing so both mailbox users on-premises and in Exchange Online will have access to the same set of public folders. Depending on whether we’re dealing with a legacy (Exchange 2007/2010) or Exchange 2013 on-premises organization, the configuration steps vary in there’s fewer steps required to configure coexistence with an Exchange 2013 on-premises organization.

If you do not have any public folders on-premises but wish to start using public folders in Exchange Online, it’s also supported to configure access to Exchange Online based public folders for on-premises mailbox users.

As some of you may recall we created a public folder mailbox and a set of public folders back in part 12 of this article series as shown in Figure 1 and 2.

Figure 1: Public Folder Mailbox in the on-premises Exchange organization

Figure 2: Public Folders in the on-premises Exchange organization

So in order to provide access to on-premises public folders from Exchange Online, the following is required:

  • The public folder mailbox must be synchronized to Exchange Online as a mail-enabled user object. Since this is a mailbox, this will be done by the directory synchronization service we already have configured.
  • The mail-enabled public folders must be synchronized to Exchange Online as a mail-enabled user object. This is currently not done by the already configured directory synchronization service. Instead, we must use a separate script named “Import-MailPublicFolders.ps1” to synchronize public folders to Exchange Online. The script is not located in the “Scripts” folder on an Exchange 2013 server, but instead have to be downloaded from here.
  • In order for Exchange Online to detect the public folders in the on-premises Exchange organization, we must configure access using the “Set-OrganizationConfig” cmdlet. This will ensure the Outlook or OWA client detects the public folders with the help of the autodiscover service.

Let’s verify the public folder mailbox is represented in Exchange Online via a MEU object. To do so, we’ll open the Exchange Admin Center in Office 365 and click “recipient” > “contacts” and search for “PFMBX1”, which is the name of my public folder mailbox.

Figure 3:
Mail-enabled User (MEU) object representing public folder mailbox in Exchange Online

Next, let’s run the aforementioned script. The script is run from the Exchange on-premises side, so let’s launch the Exchange Management Shell and navigate to the folder containing the script.

Figure 4:
Folder containing the Import-MailPublicFolders.ps1 script

First, we’ll create a variable with the credentials of a Global Administrator in our Office 365 tenant.

Figure 5: Specifying credential for variable

Then we will run the following command:

.\Import-MailPublicFolders.ps1 -Credential <credential> -ToCloud

Figure 6:
Running the Import-MailPublicFolders.ps1 script

So unlike other public folder related scripts that are available, this specific script does not rely on an XML file. It runs at the Exchange on-premises side and creates the mail public folders object in Exchange Online.

Figure 7:
Lists of the new mail public folder objects representing the on-premises mail public folders

The last step we need to perform is to point Exchange Online to the on-premises public folder mailbox(es) containing the public folders. In my case we will point to a single public folder mailbox named “PFMBX1”:

Set-OrganizationConfig –PublicFoldersEnabled Remote –RemotePublicFolderMailboxes PFMBX1

Figure 8: Pointing Exchange Online to the on-premises public folder mailbox

Verifying Access to On-Premises Public Folders from an Exchange Online Mailbox

Alright, time has come to verify that mailbox users in Exchange Online can access public folders in the Exchange 2013 based on-premises organization. To do so, I have launched an Outlook 2013 client and as you can see we are able to expand the public folder hierarchy and access public folder items.

Figure 9: Accessing on-premises public folders from an Exchange Online mailbox using Outlook 2013

We can of course also create new public folder posts etc. just like it was possible with the mailbox located in the on-premises environment.

Figure 10:
Creating a new post in an on-premises public folder

Does Migrating Public Folders to Exchange Online even make Sense?

So as I mentioned earlier in this article, there is currently no supported/native migration path from on-premises Exchange 2013 based public folders to Exchange Online. This is on the roadmap though. Until then, you would need to use third party tools.

But does it make sense to migrate your public folders to Exchange Online? Well, it of course depends on the specific organization, but in general I would say no. The vision from the Office 365 business group is that Modern Groups should replace public folders in Exchange Online. A lot of resources are put into maturing Modern Groups and there are exciting things in the horizon, when it comes to Modern Groups. Especially around the provisioned and source of authority for these groups.

In addition, a tool exists (guess it will be published soon) that can help organizations move data from public folders to Modern Groups. So I highly recommend you begin looking into Modern Groups and consider replacing your public folders with this new feature.

This concludes part 29 of this multi-part article in which I provide you with an explanation of what Windows Azure is and how you configure an Exchange 2013 hybrid lab environment in Windows Azure.

If you would like to read the other parts in this article series please go to:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top