Clarifying the public folder store removal on Exchange Server 2007

Published Nov 13 2007 02:22 PM 21.6K Views

There's been some confusion about how to gracefully remove a public store on an Exchange 2007 server, so I want to briefly review the topic and hopefully clear up a particular point. In order to remove the store, you must follow the steps described in this previous blog post:

1. Move the public folder replicas to another server. There are several ways to do this which are described in the other post.

2. Associate mailbox databases with another public folder database. Again, these steps are described in detail in the other post.

3. Remove the PF database and delete the database files manually. This is the part that trips people up. Attempting to remove the database, they encounter this error:

Remove-PublicFolderDatabase : The public folder database specified contains folder replicas. Before deleting the public folder database, remove the folders or move the replicas to another public folder database.

Now what?

Recall how this worked in Exchange 2003. When you removed a replica from a server, that server name was immediately gone when you looked at the replication tab in Exchange System Manager. However, the folder would persist in the Public Folder Instances view on that public store until all the data had replicated off. Removing the server from the replica list was only the start of the replica removal process, and ESM would not let you delete the public store until everything was gone from Public Folder Instances and the replicas had truly disappeared. The replica removal process and how to troubleshoot it was described in detail in part 3 of my replication troubleshooting series. That post describes Exchange 2003, but the process is the same in 2007.

That all still applies to Exchange 2007 - you're just using different administrative tools. When you perform step 1 above via one of the methods described, such as the MoveAllReplicas script, you've only begun the replica removal process. Remove-PublicFolderDatabase will not work until all the replicas have actually disappeared. In Exchange 2007, to see the equivalent of Public Folder Instances, you use the Get-PublicFolderStatistics command. If Get-PublicFolderStatistics still shows any folders, you won't be able to remove the public store.

So what do you do if folders are sticking in Get-PublicFolderStatistics? If they are folders that contain data you care about, you should troubleshoot the replication failure by following the steps in the post I linked to above (although you'll need to make some slight adjustments to the steps to account for the new admin tools, such as using Update-PublicFolder as a substitute for Synchronize Content in ESM). If you don't care about the folders that are stuck (for instance if they are database-specific folders such as OWAScratchPad), you can delete them with a simple command:

Get-PublicFolderStatistics | Remove-PublicFolder

That will delete the folders from the hierarchy, which will replicate to the other public stores in your environment - so again, don't do that if those folders contain data you want to keep! When the folders are deleted, or when you fix the replication problem so they can replicate off gracefully, Get-PublicFolderStatistics won't show any folders, and you'll be able to run Remove-PublicFolderDatabase.

- Bill Long

Not applicable
Hi Bill,

Our contractor removed Public Folders from our new install of Exchange 2007 (a green-fields install), and suddenly we could book meetings in rooms that were already booked! Instead of being stopped when the users clicked "Send" on their meeting request, the invitations would go out, and then the room would decline the meeting. The user would then have to reschedule!

Reactivating Public Folders brough back the "this resource is already booked" message when the users hit "Send".

If Public Folders are deprecated, shouldn't this functionality have stayed when we turned 'em off?

Yours in Confusion,

ps. Exchange/Outlook is still light-years beyond our previous Domino/Notes system! :)
Not applicable

That's weird! :(

I am unsure what to tell you at this time - however, if you opened a support case on this - I am confident this could be figured out.
Not applicable
Ok - thanks Bill. I'm actually a developer rather than an IT guy but I seem to be the only one in our IT department who actually cares that this stuff works. :)

I'll see if I can get 'em to lodge a support request about it.

Thanks for the great blog!
Not applicable
Hi Bill

I think the confusion over removing public fodlers is even simpler than you think. The problem as I see it is that people delete the databases and storage groups and then come to delete the public folders and can't. The issue is that without at least one maibox database the public folders can't replicate. As there is no replication they can't be deleted.

I think most people with this issue will find that if they create an empty mailbox database the public folders will replicate and then they will be able to delete them.

Just my 2c's worth but you may want to try deleting your mailbox db's in your lab and you will then get what everyone else is getting ..... public folders that just cannot be deleted !


Not applicable
Hi Bill

Will Removing a public folder store that still has replica folders on it using ADSIEDIT remove the original source folders?
If so why is this if they are just replicas?
Not applicable
When i try to move the replicas from the 2003 ESM i recieve this error at the end. Ideas?

Warning: Exchange System Manager
Your profile is not configured
Not applicable
Appologies if this is a duplicate.  My first posting does not appear to have been made.  The below is my question.

I have a similar problem to the one described below but I have not been able to find a resolution.  I have one exchange server that was installed during a network outage. This server has no data on it and it appears that it never completely was installed because part of the AD infrastructure was down at the time of the install.  

I need to re-install exchange but I do not have any options to do so.  There is a public folder replica somewhere that is preventing me from deleting the PF database.  I do not want to move this data to anywhere.  I have nowhere to move these folders to as I have only one exchange server.  I just need it gone so I can uninstall exchange and start over.

As far as I know there is nothing to be replicated because this server was completely unconfigured minus the base installation of exchange.

Any help is greatly appreciated.
Not applicable
Anyone got any ideas on this one???
Version history
Last update:
‎Jul 01 2019 03:32 PM
Updated by: