In Legacy Public Folder World with Exchange Server 2010, it was pretty easy to find the parent path of email enabled public folder:
(Get-MailPublicFolder MAILADRESS | Get-PublicFolder).ParentPath
Problem
You receive an error when you try the same approach with modern public folders using Exchange Server 2013+ EMS.
Get-MailPublicFolder MSTeamsPF@varunagroup.de | Get-PublicFolder Cannot process argument transformation on parameter 'Identity'. Cannot convert the "varunagroup.de/Microsoft Exchange System Objects/MSTeamsPF" value of type "Microsoft.Exchange.Data.Directory.ADObjectId" to type"Microsoft.Exchange.Configuration.Tasks.PublicFolderIdParameter". + CategoryInfo : InvalidData: (MSTEamsPF:PSObject) [Get-PublicFolder], ParameterBindinmationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-PublicFolder + PSComputerName : P01.varunagroup.de
Solution
You need to use the EntryId parameter of the Get-MailPublicFolder result.
$pf = Get-MailPublicFolder MSTeamsPF@varunagroup.de
Get-PublicFolder -Identity $pf.EntryIdName
Parent Path
---- ---------
MSTeamsPF Modern Collaboration
Get-PublicFolder does not take pipeline inputs.
Links
Enjoy modern public folders 🙂