I’ve completed configuring Office 365 Hybrid Configuration with an on premise Exchange 2010 SP3 deployment. I’m in the process of migrating users’ mailboxes to Office 365 cloud in batches. At the same time, I’ve been doing some research and testing on the best way to synchronize legacy public folders with Office 365 mailboxes. The following steps enabled me setup coexistence between Office 365 mailboxes and on premise legacy public folders:
1) Verify that the Public Folder DB is on an exchange mailbox server that has the Client Access Server role installed. My environment is running Exchange Server 2010 with a separate CAS role server and Mailbox DB separate. The Public Folder DB is on the CAS role server.
2) Create a new Mailbox Database on the CAS role server. Make sure to exclude the new DB from provisioning mailboxes:
New-MailboxDatabase -Server exch00 -Name PFsMBDatabase -EdbFilePath e:\PFsMBDB\PFMBDB.edb -LogFolderPath e:\PFMBDBLogs\-IsExcludedFromProvisioning $true
3) Create a ‘proxy’ mailbox within the new mailbox database and hide the mailbox from the address book. The SMTP of this mailbox will be returned by AutoDiscover as the DefaultPublicFolderMailbox SMTP, so that by resolving this SMTP the client can reach the legacy exchange server for public folder access :
New-Mailbox -Password (ConvertTo-SecureString -AsPlainText 'newpassw0rd' -Force) -OrganizationalUnit IT_OU -Alias PFMailbox00 -FirstName PFMailbox00 -Database PFsMBDatabase -UserPrincipalName PFMailbox00@lab.com -Name PFMailbox00 -SamAccountName PFMailbox00
Set-Mailbox -Identity PFMailbox00 -HiddenFromAddressListsEnabled $true
4) Run Azure AD Connect to synchronize the proxy mailbox user object with Office 365:
PS C:\Program Files\Microsoft Azure AD Sync\Bin> .\DirectorySyncClientCmd.exe
5) Download the synchronization scripts from the Microsoft site. I installed the scripts to a script folder on the C:\ drive:
6) Run the following command to synchronize mail-enabled public folders from your local on-premises Active Directory to O365:
Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile:sync_summary.csv
(Where Credential is your Office 365 user name and password, and CsvSummaryFile is the path to where you would like to log synchronization operations and errors, in .csv format.This script synchronizes mail-enabled public folder objects from your local Exchange on-premises deployment with Office 365. It uses the local Exchange on-premises deployment as master to determine what changes need to be applied to O365. The script will create, update, or delete mail-enabled public folder objects on O365 Active Directory based on what exists in the local on-premises Exchange deployment.)
7) Enable the exchange online organization to access the on-premises public folders. You will point to all of the proxy public folder mailboxes that you created:
Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes PFMailbox00
8) It took about 30 minutes for on premise Public Folders to become accessible to Office 365 mail clients.