Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2009-10-27

This topic explains how to use the Exchange Management Console or the Exchange Management Shell to delete public folders. This procedure deletes all the user and system public folders from the specified server and then replicates the change out to all servers. If you want to delete only one public folder from a public folder database, see How to Remove Public Folders.

Note:
If you are performing this procedure as part of a migration from Exchange Server 2003 to Exchange Server 2007, you can use either Exchange System Manager in Exchange 2003 or the Exchange Management Console in Exchange 2007 to move Exchange 2003 public folders to an Exchange 2007 server. For more information about migrating public folders, see the Microsoft Exchange Team blog article, Moving Public Folder Replicas from Exchange 2000 to Exchange 2007.

This procedure is required if you are removing the last public folder database from your Exchange organization. For detailed instructions about how to remove public folder databases, see Removing Public Folder Databases.

Caution:
The Remove-PublicFolder cmdlet will remove the public folder data from all servers in your organization. If you only want to remove data from one server, use the Set-PublicFolder –replicas command. For more information, see Set-PublicFolder.

Before You Begin

Before you perform the following procedure, you must perform the actions in one of the following sections based on whether you are working with the release to manufacturing (RTM) version of Microsoft Exchange Server 2007 or Exchange 2007 Service Pack 1 (SP1).

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

Permissions and Prerequisites for Exchange 2007 SP1

To perform this procedure, the account you use must be delegated the following:

  • Exchange Public Folder Administrator role

Permissions and Prerequisites for the RTM Version of Exchange 2007

To perform the following procedure in the RTM version of Exchange 2007, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

Also, before you perform this procedure, be aware that in the RTM version of Exchange 2007, you can manage public folders only in the Exchange Management Shell. You cannot use the Exchange Management Console.

Procedure

To delete user and system public folders

  1. To delete all user public folders, run the following command:

    Copy Code
    Get-PublicFolder -Server <server containing the public folder database> "\" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue
    
  2. To delete all system public folders, run the following command:

    Copy Code
    Get-PublicFolder -Server <server containing the public folder database> "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue
    
  3. To verify that all public folders have been deleted, run the following command:

    Copy Code
    Get-PublicFolderStatistics -Server <server containing the public folder database> | fl
    

For detailed syntax and parameter information, see the following reference topics:

For More Information

For more information about how to remove public folders, see Removing Public Folder Databases.

For more information about managing public folders, see Managing Public Folders.

For more information about using the Exchange Management Shell, see Using the Exchange Management Shell.

For more information about using the Exchange Management Shell scripts to manage public folders in Microsoft Exchange Server 2007, see Scripts for Managing Public Folders in the Exchange Management Shell.