Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-06
Use the Get-PublicFolder cmdlet to retrieve the attributes of a public folder or a set of public folders.
Syntax
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>]
|
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
GetChildren |
Required |
System.Management.Automation.SwitchParameter |
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. |
Recurse |
Required |
System.Management.Automation.SwitchParameter |
The Recurse parameter specifies that the command must return the specified public folder and all its children. |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
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. |
Identity |
Optional |
Microsoft.Exchange.Configuration.Tasks.PublicFolderIdParameter |
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. |
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 the GetChildren parameters. |
Server |
Optional |
Microsoft.Exchange.Configuration.Tasks.ServerIdParameter |
The Server parameter specifies the server on which to perform the selected operations. |
Detailed Description
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.
Input Types
Return Types
Errors
Error | Description |
---|---|
|
Exceptions
Exceptions | Description |
---|---|
|
Example
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.
Copy Code | |
---|---|
Get-PublicFolder 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 |