1. Home
  2. Docs
  3. Super-ExMerge On-line Doc...
  4. Common Tasks
  5. How to sync or migrate Public Folders to a Shared Mailbox

How to sync or migrate Public Folders to a Shared Mailbox

IMPORTANT! Please read our blog post about this topic before assuming that this path is the best and most appropriate path for public folder data.
Migrating Public Folders to Shared Mailboxes – is it a good idea?

Given the fundamental nature of the design of Super-ExMerge, it is easily possible to sync data from Public Folders to a shared mailbox (or regular mailbox, or PST file, or archive mailbox for that matter).

With the options to include and exclude folders in a sync task, Super-ExMerge provides some feature and capability that simply does not exist with other tools. For example, if only a specific subtree of a public folder deployment was desired to be placed into a shared mailbox, this can easily be done with Super-ExMerge. In contrast with Microsoft own tools and scripts which tend to operate on public folders as a whole-system.

The first step to perform is to determine whether the entire public folder hierarchy is to be sync’d or simply one or more folders in the hierarchy. Note that Exchange 2013 and later have support limits on mailbox sizes such that it may be infeasible or impossible to sync the entirety of public folders to a single mailbox. Be sure to evaluate sizes of data properly before deciding, especially given the “data tax” that exists when bringing data out of Exchange 2010 or earlier forward to Exchange 2013 and later.

The next step is to create a connection info object that describes the two endpoints of the sync, at a connection level (folder level detail comes later).

$conn = New-ConnectionInfo -SourceType PublicFolder -TargetType Mailbox -SourceSmtp pfsync@source.com -SourceServer exch-01.source.com -SourceCreds 'pfsync@source.com:HostKey#9g8vbjmuina9087f98ufd==' -TargetSmtp 'projects@source.com' -TargetServer exch-01.source.com -TargetCreds 'pfsync@source.com:HostKey#9g8vbjmuina9087f98ufd=='

The above command, New-ConnectionInfo establishes the base connection info in to the source and target of the sync. Some specific notes about this line:

  • The source and target are in the same environment, as evidenced by the use of the same servername.
  • The account, pfsync@source.com, is implied to have either FullAccess or System permissions over the projects@source.com mailbox as evidenced by the use of the same credentials between the source and target store.

Now that the base connection info is established, a sync task can be created to define more details about how the sync should operate.

$task = New-SyncTask -ConnectionInfo $conn -OneWaySyncSourceToTarget
$folder = New-StartingFolder -SourceFolderPath '\US\Commercial\Projects' -TargetFolderPath '\{Inbox}' -TargetFolderCreateOption CreateFolderName -IncludeSubfolders
$task.StartingFolders.Add($folder)

In the above script fragment, several things have occurred…

  1. A new sync task object was created, using the connection info created prior and setting the sync as a one-way sync.
  2. A new starting folder object was created describing a specific folder from the Public Folder system to capture and where to place that data in the target side.
  3. The new starting folder object was added to the list of starting folder for the task.
NOTE:

The -TargetFolderCreateOption is an import feature to understand. If the example were set to ‘\{Inbox}\Projects‘ for the target folder and the option was left as CreateFolderName, the target folder path would become ‘\{Inbox}\Projects\Projects‘, which is probably not desired. Be sure to review the New-StartingFolder cmdlet for detail about the effects of the -TargetFolderCreateOption parameter.

Some notes on these actions: the New-SyncTask cmdlet has a -Folders parameter in which we could have created the starting folder first, then simply passed the object as a value for the parameter. In the above it was chosen to show alternate pattern of directly accessing the property of the task object itself to add the starting folder.
Further note that in the New-StartingFolder, the source and target folder paths are not exactly the same, and are not required to be so. The -TargetFolderCreateOption directs the sync to create the ‘Projects’ folder from the source as a child of the Inbox folder in the target shared mailbox.

Then next thing to do is to add the task to the task queue for processing:

add-SyncTask -Task $task

That’s it! Easy!

How can we help?