Announcing Public Folder Migration Scripts with Modern Authentication Support

Published May 16 2022 12:13 PM 7,465 Views

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

AddMembersToGroups.ps1

Public folder to Microsoft 365 Group migration

https://www.microsoft.com/en-us/download/details.aspx?id=55985

LockAndSavePublicFolderProperties.ps1

UnlockAndRestorePublicFolderProperties.ps1

Sync-ModernMailPublicFolders.ps1

Sync mail-enabled public folders to Exchange Online

https://www.microsoft.com/en-us/download/details.aspx?id=54855

Sync-MailPublicFoldersCloudToOnprem.ps1

Sync mail-enabled public folders from Exchange Online to on-premises

https://www.microsoft.com/en-us/download/details.aspx?id=52037

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:

Parameter

Description

Example

Credential

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

CsvSummaryFile

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

ConnectionUri

URI to the Exchange Online PowerShell.

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

 

FixInconsistencies

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

 

Force

Force the script execution and bypass validation warnings.

 

Usage

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.

Example:

 

.\Sync-ModernMailPublicFolders.ps1 -Credential $c -CsvSummaryFile summ.csv

 

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

 

.\Sync-ModernMailPublicFolders.ps1 -Credential $c -CsvSummaryFile summ.csv -FixInconsistencies

 

Another example:

Use the Sync-ModernMailPublicFolders script without -Credentials parameter, if MFA is enabled on the tenant; provide the credentials in the prompt that follows:

 

.\Sync-ModernMailPublicFolders.ps1 -CsvSummaryFile sync_Log.csv

 

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

12 Comments
Co-Authors
Version history
Last update:
‎May 19 2022 07:47 AM
Updated by:
www.000webhost.com