I try to decommissioning my Exchange 2007 server after migration to Exchange 2013, to migrate to 2016 in the future.

I removed all mailbox databases, but not the publicfolder database, i got an error

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.

This is a common error but all i tried doesn't work cause i haven't any publicfolder.

Get-PublicFolderStatistics show me some system/hidden publicfolders :

Name                                     ItemCount               LastAccessTime
----                                     ---------               --------------
EX:/o=Sb/ou=Exchange Administrative Grou 0                  12/04/2016 10:55:23
p (FYDIBOHF23SPDLT)                                                            
EX:/o=Sb/ou=Exchange Administrative Grou 0                  12/04/2016 10:55:23
p (FYDIBOHF23SPDLT)                                                            
globalevents                             0                  12/04/2016 10:55:23
internal                                 0                  12/04/2016 10:55:23
OWAScratchPad{0328B619-6465-4137-98FF-3B 0                  12/04/2016 10:55:23
StoreEvents{0328B619-6465-4137-98FF-3B5B 0                  12/04/2016 10:55:23

Get-PublicFolder return the error :

There is no existing PublicFolder that matches the following Identity: '\'. Please make sure that you specified the correct PublicFolder Identity and that you have the necessary permissions to view PublicFolder.

In the Exchange 2013 side, these 2 cmdlet return no public folder.

So, i tried Exchange scripts :

RemoveReplicaFromPFRecursive.ps1 -TopPublicFolder "\" -ServerToRemove old return an error return the same error than Get-PublicFolder "\".

MoveAllReplicas.ps1 -server old -newserver new return return the same errors than Get-PublicFolder and Get-PublicFolder \NON_IPM_SUBTREE -recurse -resultsize unlimited

I tried to create one publicfolder :

New-PublicFolder -name test return an error return the same error than Get-PublicFolder.

Thank for help !

  • Are you 100% confident that all data is moved and accessible on Exchange 2013? Then consider using ADSIEDIT to remove the public folders database. lmgtfy.com/?q=exchange+public+folders+adsiedit+remove
    – Vick Vega
    Apr 13, 2016 at 3:04
  • It was explained on some tutorial, but marked as dangerous. So i tried and it works. I hope there where not problems in the future.
    – Baud
    Apr 13, 2016 at 11:35

3 Answers 3


You get this error because you cannot delete a public folder database that contains data. To get in detailed about how do we remove public folder replicas from the database refer to this article that have documented steps and the links to get this job done. www.petenetlive.com/KB/Article/0000227

You may also get help from this step-by-step guide to migrate from Exchange Server 2007 to Exchange Server 2013 and after migration Decommissioning Exchange Server 2007

Hope this helps!

  • Thank you. These link explain how to migrate publicfolder, in the case where everything going right. That's not my case. I cannot use the simpliest cmdlet (get-publicfolder), so i cannot start new-publicfoldermigrationrequest too.
    – Baud
    Apr 12, 2016 at 12:29

The only solution consisting to remove the storage group using ADSIEdit


Environment : Exchange 2007, Exchange 2010, Exchange 2013 & O365.


Microsoft Exchange Error
The public folder database ‘Public Folder Database’ cannot be deleted.

Public Folder Database
The public folder database "SERVERNAMESecond Storage GroupPublic Folder Database" contains folder replicas. Before deleting the public folder database, remove the folders or move the replicas to another public folder database. For detailed instructions about how to remove a public folder database, see http://go.microsoft.com/fwlink/?linkid=81409.



  1. Dismounted PF database and Renamed current PF database on Exchange 2007 server.
  2. Mounted PF database which created new blank database (Dial Tone) at this point this blank database was pointing to old exchange 2007.
  3. Also Mounted all last remaining storage groups on this exchange 2007 PF servers.
  4. Updated replica for this new blank database to new exchange 2010 from PF management console.

Then we again tried to uninstall Exchange using below command.

%programfiles%\Microsoft\Exchange Server\bin\Setup.com /mode:uninstall

Than we encountered Version Error saying this is read only database and need to be removed from higher version of exchange.

Hence we removed this blank exchange 2007 PF database from Exchange 2010 shell using remove-publicfolder command.

Once PF database is removed from exchange 2007 we are clean to uninstall exchange 2007.

And then we were able to successfully uninstall Exchange 2007 using

 "%programfiles%\Microsoft\Exchange Server\bin\Setup.com /mode:uninstall" command

Let me know if this helps! 🙂

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.