Exchange 2013 Hybrid public folder sync script error

Copper Contributor

Public Folders are not visible to mailboxes migrated to 365, so I am following Configure Exchange Server public folders for a hybrid deployment | Microsoft Docs


The issue is the script gives the following error:

[1/26/2021 1:24:39 PM] Creating an Exchange Online remote session...
[1/26/2021 1:24:44 PM] Exchange Online remote session created successfully.
[1/26/2021 1:24:44 PM] Enumerating local mail enabled public folders...
[1/26/2021 1:24:48 PM] Mail public folders enumeration completed: 312 local folder(s) found.
[1/26/2021 1:24:48 PM] Enumerating Exchange Online mail enabled public folders...
Get-EXOMailPublicFolder : The term 'Get-EXOMailPublicFolder' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At C:\Users\drathbone\Desktop\O365\PF\Sync-ModernMailPublicFolders.ps1:550 char:24
+ $remoteFolders = @(Get-EXOMailPublicFolder -ResultSize:Unlimited | Sort OnPr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-EXOMailPublicFolder:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException



I've searched for "Get-EXOMailPublicFolder" on the Internet, with no mention of this PS command.  What am I missing?

2 Replies

I have the same error. fully updated 2016 server with all updates. both on OS and on exchange. 


@DRathbone Do you already have a solution? or a ticket created at Microsoft ?

@Mark_WolterSame issue - did you find a fix for this?