Exchange 2013 Hybrid public folder sync script error

%3CLINGO-SUB%20id%3D%22lingo-sub-2098753%22%20slang%3D%22en-US%22%3EExchange%202013%20Hybrid%20public%20folder%20sync%20script%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2098753%22%20slang%3D%22en-US%22%3E%3CP%3EPublic%20Folders%20are%20not%20visible%20to%20mailboxes%20migrated%20to%20365%2C%20so%20I%20am%20following%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Fhybrid-deployment%2Fset-up-modern-hybrid-public-folders%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EConfigure%20Exchange%20Server%20public%20folders%20for%20a%20hybrid%20deployment%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20issue%20is%20the%20script%20gives%20the%20following%20error%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%5B1%2F26%2F2021%201%3A24%3A39%20PM%5D%20Creating%20an%20Exchange%20Online%20remote%20session...%3CBR%20%2F%3E%5B1%2F26%2F2021%201%3A24%3A44%20PM%5D%20Exchange%20Online%20remote%20session%20created%20successfully.%3CBR%20%2F%3E%5B1%2F26%2F2021%201%3A24%3A44%20PM%5D%20Enumerating%20local%20mail%20enabled%20public%20folders...%3CBR%20%2F%3E%5B1%2F26%2F2021%201%3A24%3A48%20PM%5D%20Mail%20public%20folders%20enumeration%20completed%3A%20312%20local%20folder(s)%20found.%3CBR%20%2F%3E%5B1%2F26%2F2021%201%3A24%3A48%20PM%5D%20Enumerating%20Exchange%20Online%20mail%20enabled%20public%20folders...%3CBR%20%2F%3EGet-EXOMailPublicFolder%20%3A%20The%20term%20'Get-EXOMailPublicFolder'%20is%20not%20recognized%20as%20the%20name%20of%20a%20cmdlet%2C%20function%2C%3CBR%20%2F%3Escript%20file%2C%20or%20operable%20program.%20Check%20the%20spelling%20of%20the%20name%2C%20or%20if%20a%20path%20was%20included%2C%20verify%20that%20the%20path%20is%3CBR%20%2F%3Ecorrect%20and%20try%20again.%3CBR%20%2F%3EAt%20C%3A%5CUsers%5Cdrathbone%5CDesktop%5CO365%5CPF%5CSync-ModernMailPublicFolders.ps1%3A550%20char%3A24%3CBR%20%2F%3E%2B%20%24remoteFolders%20%3D%20%40(Get-EXOMailPublicFolder%20-ResultSize%3AUnlimited%20%7C%20Sort%20OnPr%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20ObjectNotFound%3A%20(Get-EXOMailPublicFolder%3AString)%20%5B%5D%2C%20CommandNotFoundException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20CommandNotFoundException%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20searched%20for%20%22Get-EXOMailPublicFolder%22%20on%20the%20Internet%2C%20with%20no%20mention%20of%20this%20PS%20command.%26nbsp%3B%20What%20am%20I%20missing%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2098753%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ehybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Regular Visitor

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?

1 Reply

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 ?