Applies to: Exchange Server 2013

Topic Last Modified: 2013-01-08

Use the Get-PublicFolder cmdlet to retrieve the attributes of a public folder or a set of public folders.

For information about the parameter sets in the Syntax section below, see Syntax.

Syntax

Get-PublicFolder [-Identity <PublicFolderIdParameter>] <COMMON PARAMETERS>
Get-PublicFolder -Recurse <SwitchParameter> [-Identity <PublicFolderIdParameter>] [-ResultSize <Unlimited>] <COMMON PARAMETERS>
Get-PublicFolder -GetChildren <SwitchParameter> [-Identity <PublicFolderIdParameter>] [-ResultSize <Unlimited>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-DomainController <Fqdn>] [-Mailbox <MailboxIdParameter>] [-Organization <OrganizationIdParameter>] [-ResidentFolders <SwitchParameter>]

Examples

EXAMPLE 1

This example uses the Get-PublicFolder command without parameters to return the root public folder object (IPM_SUBTREE).

Copy Code
Get-PublicFolder

EXAMPLE 2

This example returns the names of all the system folders (which aren't shown by default), starting at the system folder root (\NON_IPM_SUBTREE).

Copy Code
Get-PublicFolder -Identity \NON_IPM_SUBTREE -Recurse | Format-List Name

EXAMPLE 3

This example returns the Pending Litigation public folder from \Legal\Documents\.

Copy Code
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation"

EXAMPLE 4

This example returns the Pending Litigation public folder from \Legal\Documents\ and all the public folders under the Pending Litigation public folder. Because the result size isn't specified, the command returns up to the maximum number of public folders, which is 10,000.

Copy Code
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation" -Recurse

EXAMPLE 5

This example returns the Pending Litigation public folder from \Legal\Documents\ and all the public folders under the Pending Litigation public folder, without a limit on the number returned.

Copy Code
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation" -Recurse -ResultSize Unlimited

EXAMPLE 6

This example returns the public folders that reside in the public folder content mailbox Legal Department.

Copy Code
Get-PublicFolder -Mailbox "Legal Department" -ResidentFolders

Detailed Description

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Public folders" entry in the Sharing and Collaboration Permissions topic.

Parameters

Parameter Required Type Description

GetChildren

Required

System.Management.Automation.SwitchParameter

The GetChildren parameter specifies whether to retrieve only the children of the folder specified by the Identity parameter. You can't use the GetChildren parameter with the Recurse parameter.

Recurse

Required

System.Management.Automation.SwitchParameter

The Recurse parameter specifies that the command must return the specified public folder and all its children. You don't need to specify a value with this parameter.

You can't use the GetChildren parameter with the Recurse parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.PublicFolderIdParameter

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.

You can omit the parameter label Identity so that only the public folder name or GUID is supplied.

Mailbox

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Mailbox parameter specifies the identity of the hierarchy public folder mailbox.

This parameter accepts the following values:

  • Alias

    Example: JPhillips

  • Canonical DN

    Example: Atlanta.Corp.Contoso.Com/Users/JPhillips

  • Display Name

    Example: Jeff Phillips

  • Distinguished Name (DN)

    Example: CN=JPhillips,CN=Users,DC=Atlanta,DC=Corp,DC=contoso,DC=com

  • Domain\Account

    Example: Atlanta\JPhillips

  • GUID

    Example: fb456636-fe7d-4d58-9d15-5af57d0354c2

  • Immutable ID

    Example: fb456636-fe7d-4d58-9d15-5af57d0354c2@contoso.com

  • Legacy Exchange DN

    Example: /o=Contoso/ou=AdministrativeGroup/cn=Recipients/cn=JPhillips

  • SMTP Address

    Example: Jeff.Phillips@contoso.com

  • User Principal Name

    Example: JPhillips@contoso.com

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

The Organization parameter is reserved for internal Microsoft use.

ResidentFolders

Optional

System.Management.Automation.SwitchParameter

The ResidentFolders specifies whether to return public folders that reside in a specific content public folder mailbox. If this parameter isn’t specified, the command will only return public folders whose contents reside in the primary hierarchy public folder mailbox.

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

The ResultSize parameter specifies the maximum number of results to return. The default maximum is 10,000. For no limit on the returned results, set this parameter to Unlimited. This parameter can only be passed in combination with the Recurse or GetChildren parameters.

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.