Remove-PublicFolder (RTM)
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
Use the Remove-PublicFolder cmdlet to remove an existing public folder.
Warning
The Remove-PublicFolder cmdlet will remove the public folder data from all servers in your organization. If you want to remove data from only one server, use the Set-PublicFolder –replicas command. For more information, see Set-PublicFolder.
Syntax
Remove-PublicFolder -Identity <PublicFolderIdParameter> [-DomainController <Fqdn>] [-Recurse <SwitchParameter>] [-Server <ServerIdParameter>]
Detailed Description
To run the Remove-PublicFolder cmdlet, the account you use must be delegated the following:
- Exchange Organization Administrator role
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the domain controller to use to write this configuration change to Active Directory. Use the fully qualified domain name (FQDN) of the domain controller that you want to use. |
Identity |
Required |
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. |
Recurse |
Optional |
System.Management.Automation.SwitchParameter |
When it is specified, the Recurse parameter specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message. |
Server |
Optional |
Microsoft.Exchange.Configuration.Tasks.ServerIdParameter |
The Server parameter specifies the identity of the server from which to remove the public folder. |
Input Types
Return Types
Errors
Error | Description |
---|---|
|
Exceptions
Exceptions | Description |
---|---|
|
Example
This example deletes the public folder named My Public Folder from the \Test\Directory tree.
Remove-PublicFolder -Identity "\Test\Directory\My Public Folder"
All parameters for the Remove-PublicFolder command accept pipelined input.