Get-PublicFolder (RTM)

Exchange 2007

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.


Applies to: Exchange Server 2007

Topic Last Modified: 2015-03-09

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

Get-PublicFolder [-Identity <PublicFolderIdParameter>] [-DomainController <Fqdn>] [-Server <ServerIdParameter>]

Get-PublicFolder [-Identity <PublicFolderIdParameter>] -GetChildren <SwitchParameter> [-DomainController <Fqdn>] [-ResultSize <Unlimited>] [-Server <ServerIdParameter>]

Get-PublicFolder [-Identity <PublicFolderIdParameter>] -Recurse <SwitchParameter> [-DomainController <Fqdn>] [-ResultSize <Unlimited>] [-Server <ServerIdParameter>]

To run the Get-PublicFolder cmdlet, the account you use must be delegated the following:

  • Exchange View-Only Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.


Parameter Required Type Description




Use the GetChildren parameter to retrieve only the children of the folder specified by the Identity parameter. The GetChildren parameter is mutually exclusive with the Recurse parameter.




The Recurse parameter specifies that the command must return the specified public folder and all its children.




To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from the Active Directory directory service, include the DomainController parameter in the command.




Use the Identity parameter to specify 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.




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 the GetChildren parameters.




The Server parameter specifies the server on which to perform the selected operations.


Error Description



Exceptions Description


The following code examples show how to use the Get-PublicFolder command:

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

  • The second example returns the names of all the system folders (which are not shown by default), starting at the system folder root (\NON_IPM_SUBTREE).

  • The third example returns the public folder with the specified long-term entry identifier.

  • The fourth example returns the Pending Litigation public folder from \Legal\Documents\.

  • The fifth example returns the Pending Litigation public folder from \Legal\Documents\ and up to 9,999 public folders under the Pending Litigation public folder.

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

Get-PublicFolder -Identity \NON_IPM_SUBTREE -Recurse | Format-List Name  
Get-PublicFolder -Identity <long-term entry identifier of a public folder>
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation"
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation" -Recurse
Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation" -Recurse -ResultSize Unlimited