Announcing Public Folder Migration Scripts with Modern Authentication Support

Announcing Public Folder Migration Scripts with Modern Authentication Support

We are excited to announce that we have updated the following scripts for migrating public folders from Exchange Server to Exchange Online to support Modern authentication.

Script name

When to use

Download location


Public folder to Microsoft 365 Group migration




Sync mail-enabled public folders to Exchange Online

We’re also excited to announce that we have added additional capabilities and checks to the Sync-ModernMailPublicFolders.ps1 script, which is used to synchronize mail-enabled public folders from Exchange Server to Exchange Online.

The following are some of the improvements in Sync-ModernMailPublicFolders.ps1:

  • Supports Modern authentication as well as multi-factor authentication (MFA)
  • Uses Exchange Online PowerShell v2 module
  • Implicitly downloads and invokes ValidateMailEnabledPublicFolders.ps1
  • Finds and reports the following inconsistencies with mail-enabled public folders (MEPFs):
    • Orphaned, duplicate, or disconnected MEPFs
    • Mail-enabled system folders
  • Can fix above reported inconsistencies

The script must be run from the Exchange Management Shell on Exchange Server 2013 or later.

Here’s some of the important parameters for the script:





Use to provide stored credentials or provide credentials at the time of running script.

Note: Don’t use if MFA is enabled.

$cred = Get-Credentials


.\Sync-ModernMailPublicFolders.ps1 -Credential $cred


The file path where sync operations and errors will be logged in a CSV format. This parameter is mandatory.

.\Sync-ModernMailPublicFolders.ps1 -Credential $cred -CsvSummaryFile sync_Log.csv


URI to the Exchange Online PowerShell.

The script will use default connection URI if no value is provided.



Fixes any inconsistencies such as orphaned, duplicate, or disconnected mail-enabled public folders.



Force the script execution and bypass validation warnings.



In the default mode, the script finds and reports orphaned MEPFs and any inconsistencies in MEPFs. It does so by implicitly downloading and invoking the ValidateMailEnabledPublicFolders.ps1 script.




Running the script with “FixInconsistencies” parameter will fix issues found with MEPFs:



Exchange 2010 public folder migrations to Exchange Online continue using only basic authentication since Exchange 2010 doesn’t meet the requirements to support modern authentication. You still must have basic authentication enabled for remote PowerShell on your Exchange Online tenant to migrate legacy public folders to Exchange Online directly from Exchange 2010. Please complete those migrations before October 2022!

Exchange Public Folder Team


via Microsoft Tech Community

May 16, 2022 at 08:16PM