Monday, June 16, 2025

Convert Public Folders to Shared Mailboxes

Most of the companies I work with have very limited use of public folders. Many of them converted their public folders to shared mailboxes a long time ago. On a recent migration project with a company merger, we took the opportunity to convert their public folders the shared mailboxes and I thought I'd document a few things that were ambiguous in the process.

In general the process is:

  1. Export the public folders as PST files
  2. Create PST files for individual shared mailboxes 
  3. Import the PST files to shared mailboxes 

Exporting public folders

The export process for public folders is pretty clunky. If you have small public folders, you can use Outlook to export individual public folders to PST. However, Outlook is very slow to process PST exports and if you have a high volume of data or a large number of items, it will be a very long process. Additionally, if you have many public folders, it requires you to perform an action for each one. Which means you need to babysit this very long process.

In our project, one public folder was over 20GB with all of them totalling about 40GB. So, using Outlook was not a realistic option for export.

In Microsoft 365, you can use eDiscovery (found in Solutions) in Microsoft Purview to collect public folder data as PST files for download. To do this, you need to be assigned as an eDiscovery Manager or eDiscovery Administrator (https://learn.microsoft.com/en-us/purview/ediscovery-assign-permissions). Being a Global Admin is not sufficient.

  1. Create a case
  2. Create a search
    • Add All Public Folders as a tenant-wide source. No other search terms are required because we want all data in public folders. There is no easy way to filter by specific public folder.
  3. Export the data
    • Select items to include in your report: Include partially indexed items in case there are unindexed attachments you want collected.
    • Export type: Test by exporting report only, review that report, and then export items with items report.
    • Export format: Create PSTs for messages
      • Organize data from different locations into separate folders or PSTs. This will generate separate PSTs for each public folder mailbox.
      • Include folder and path of the source. This is required to keep items sorted into folders for each public folder. Without this, you get one big lump of items.
      • Give each item a friendly name. Not sure the effect of this one, but I left it on.
  4. Download the PST from the Export
    • It will take a while for the export run. A report is faster than generating the PST. In this project with about 50GB of public folder data generating the report took about 1 hour and generating the PST took about 5 hours.
    • Use Process Manager to view the status of your export and download the PST files. 

My export generated two zip files for download. Each zip file had multiple PST files with a maximum size of 10GB for a total of almost 50GB of data.

If you have large public folders, their content might be contained in multiple PST files. So, the folder appears in multiple PST files with some items in PST#1, some in PST#2, and some in PST#3.

Create PST files for individual shared mailboxes

If you have a small number of public folders and a small amount of data, you could copy data directly from the downloaded PST files to the new shared mailboxes by using Outlook. If you want to use the bulk PST import process in eDiscovery, then you need to create individual PST files for each shared mailbox.

In my testing, I found that the export process for PSTs was very slow. In this method, I opened a large PST and then selected the export to PST option in Outlook. File > Open & Export > Import/Export > Export to a file. This process is convenient because it creates the PST for you, but took a very long time.

 

What I found to be faster was adding an empty PST file to the Outlook profile and then copying the folder to the already attached PST file. An export that would take 10 minutes was about a 1 or 2 minute copy. A 10GB copy took 20-30 minutes instead of hours.

When you copy the public folder from the source PST to the empty PST, it retains the same name. So, I'd end up with a folder like Manufacturing Calendar in the PST.

When you import the PST later on, the folder name from the PST used in the shared mailbox. If the folder already exists the items are copied into it. If the folder does not exist, then the folder is created with that name and the items are copied into it.

All of the public folders I was importing were calendars, and I wanted the data to appear in the calendar of the shared mailbox. So, in the target PST, I renamed the copied folder to Calendar.

If a public folder appears in multiple source PST files, I created multiple PST files for import. I didn't try to combine the items into a single PST. The PST import process supports multiple PST files being imported into a single mailbox.

Import the PST files to shared mailboxes

Microsoft provides pretty solid documentation on how to perform the PST import to shared mailboxes. So, I won't repeat those details (https://learn.microsoft.com/en-us/purview/use-network-upload-to-import-pst-files). However, I do have a few notes that I think are worthwhile being aware of.

To import PST files, you create an import job. To create an import job, you need the Mailbox Import Export role in Exchange Online. Being an M365 Global Admin is not sufficient. After you assign the Mailbox Import Export role, the documentation states it might take up to 24 hours to take effect. However, generally it takes effect within an hour or so.

Each time you create an import job, there is an option Show network upload SAS URL. When you click the button it provides a unique URL for import job. However, all URLs upload to the same location in your tenant. When you do multiple uploads, you can keep using the same URL

The supported upload process is to use Azcopy.exe. I found this utility unreliable with the default settings. I got various errors about servers not responding. After switching from wireless to wired it got better, but still was unreliable and erroring out during uploads.

The default configuration for Azcopy.exe tries to use 16 simultaneous connections for the upload. This saturated my internet connection. Maxing out the internet upload speed (approx 115 Mbps) is normally good, but Azcopy.exe didn't seem to handle it well. After I set the environmental variable AZCOPY_CONCURRENCY_VALUE to AUTO then it was reliable for upload (https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-optimize#increase-the-number-of-concurrent-requests). It determined that 5 was optimal and uploaded very close to 115Mbps. Setting the concurrency to 4 or 5 would also have been a reasonable approach.

You create a csv file that defines the PST files and the mailboxes they are to be imported into. This csv file can have multiple references to the same mailbox if there are multiple PST files being imported into it.

There are two stages to creating a job. The first is analysis where the import process verifies that the PST filename and mailbox references in the csv are valid. In general, this first phase takes 1-2 hours. Be patient, there's no way to speed this up.

After the analysis phase is complete, you need select the Import to Office 365 option to create the mailbox import jobs. Once you do this, it may take an hour or more before the import shows as in progress. Be patient, there's no way to speed this up.

Once the import jobs are created, you can monitor the details by using Get-MailboxImportRequest and Get-MailboxImportRequest -IncludeReport. If there are any errors during import, the report will show the details of why. For example, it will show if an oversized item is skipped. Our shared mailboxes had the default maximum message size of 35MB and one item was above that size. I was able to identify that from the log.

I saw my largest PST files import at approximately 1 GB per hour. However, both of these files were importing into the same mailbox at the same time. I'm not sure whether the limiting factor was speed per PST or speed per mailbox. 

If you reimport the same PST into a mailbox multiple times, it does not duplicate the items. So, if several items are rejected because they were oversized, you can set the max message size on the mailbox and reimport the same PST.