the script Sync-ModernMailPublicFolders.ps1 deletes the public folder online

Brass Contributor

https://docs.microsoft.com/en-us/exchange/hybrid-deployment/set-up-modern-hybrid-public-folders

the script Sync-ModernMailPublicFolders.ps1 deletes the  mail enable public folder online. there is no reason given why it is deleting the  MEPF.  The article states it sync object to exo then why it  has delete function.

Please someone explain why we are removing EXO MEPF ?

1 Reply

@Robin_Poulose  - I am having this issue as well. 

I also assumed that the script would do as stated in Announcing Public Folder Migration Scripts with Modern Authentication Support - Microsoft Community ... of "which is used to synchronize mail-enabled public folders from Exchange Server to Exchange Online.”

 

However, I did capture a Write error below.

It should NOT be looking in our online org, it should be looking in our on-prem AD org.

Not to mention, all of our on-prem Public Folders ARE PF Mailboxes. 

 

Write-ErrorMessage : |Microsoft.Exchange.Data.StoreObjects.ObjectNotFoundException|No active public folder mailboxes
were found for organization xxx.onmicrosoft.com. This happens when no public folder mailboxes are provisioned or
they are provisioned in 'HoldForMigration' mode. If you're not currently performing a migration, create a public
folder mailbox.
At C(removed path for privacy)\tmpEXO_oziz4bng.f0a.psm1:1106 char:13
+ Write-ErrorMessage $ErrorObject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PublicFolder], ObjectNotFoundException
+ FullyQualifiedErrorId : ......