Commands › Exchange Online

Get-MailPublicFolder

Exchange Online ExchangeOnlineManagement Get-*

Retrieve mail-related information about mail-enabled public folders. If you want information about the basic (not mail-related) settings of mail-enabled public folders, use the Get-PublicFolder cmdlet instead.

Quick start script

# Get-MailPublicFolder — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-MailPublicFolder | Format-List

# 3. Export for evidence / drift tracking
Get-MailPublicFolder | Export-Clixml .\MailPublicFolder-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

AnrSet

Get-MailPublicFolder [-Anr <String>]
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-Filter <String>]
 [-IgnoreDefaultScope]
 [-IncludeGrantSendOnBehalfToWithDisplayNames]
 [-ReadFromDomainController]
 [-ResultSize <Unlimited>]
 [-Server <ServerIdParameter>]
 [-SortBy <String>] [<CommonParameters>]

Identity

Get-MailPublicFolder [[-Identity] <MailPublicFolderIdParameter>]
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-Filter <String>]
 [-IgnoreDefaultScope]
 [-IncludeGrantSendOnBehalfToWithDisplayNames]
 [-ReadFromDomainController]
 [-ResultSize <Unlimited>]
 [-Server <ServerIdParameter>]
 [-SortBy <String>] [<CommonParameters>]

Parameters (11)

ParameterTypeRequiredWhat it controls
-Identity MailPublicFolderIdParameter The Identity parameter specifies the GUID or public folder name that represents a specific public folder. You can also include the path using the format \\TopLevelPublicFolder\\PublicFolder.
-Anr String The Anr parameter specifies a string on which to perform an ambiguous name resolution (ANR) search. You can specify a partial string and search for objects with an attribute that matches that string. The default...
-Credential PSCredential The Credential parameter specifies the username and password that's used to run this command. Typically, you use this parameter in scripts or when you need to provide different credentials that have the required permissions.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-Filter String The Filter parameter uses OPATH syntax to filter the results by the specified properties and values. The search criteria uses the syntax `"Property -ComparisonOperator 'Value'"`.
-IgnoreDefaultScope SwitchParameter The IgnoreDefaultScope switch tells the command to ignore the default recipient scope setting for the Exchange PowerShell session, and to use the entire forest as the scope. You don't need to specify a value with this switch.
-IncludeGrantSendOnBehalfToWithDisplayNames SwitchParameter This parameter is available only in the cloud-based service.
-ReadFromDomainController SwitchParameter This parameter is available only in on-premises Exchange.
-ResultSize Unlimited The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.
-Server ServerIdParameter The Server parameter filters the results by the specified Exchange server. You can use any value that uniquely identifies the server. For example:
-SortBy String The SortBy parameter specifies the property to sort the results by. You can sort by only one property at a time. The results are sorted in ascending order.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.