Cannot remove Public Folder database from Exchange 2007 server

8

Here is some notes from a recent issue error, I encountered at a client, doing a decommission of some Exchange 2007 servers.

We had followed the best practices for moving Public Folder database content to new Public Folder databases. But still could not remove the Public Folder databases on some of the Exchange 2007 servers.

The best practices for removing a Public Folder database is:

1. Move the public folder replicas to another server. See my previous post about Public Folder replica management.

2. Associate mailbox databases with another public folder database.

3. Remove the PF database and delete the database files manually.

 

This error you might see in step 3, when trying to remove the Public Folder database is:

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

Public Folder Database
Failed
Error:
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.

——————————————————–
OK
——————————————————–

 

If you have followed the best practices and you still cannot remove the Public Folder, check which folders still reside in the database, using:

Get-PublicFolderStatistics –Server SERVERNAME

 

If the folders left are folders you care about, you should continue troubleshooting replication issues. But if the folders are leftover that you know have been replicated or if it is system folders, such as OWAScratchPad, you can remove them using:

Get-PublicFolderStatistics –Server SERVERNAME | Remove-PublicFolder

 

Be careful with the above command, since it removes everything left within your Public Folder database.

Now you should be able to Remove the Public Folder database from you Exchange 2007 server.

Other great references on the issue:

About Author

Peter is an Exchange specialist with over 15+ years of experience with Exchange Server and certified Microsoft Certified Master (MCM) and Microsoft Certified Solutions Master (MCSM) on Exchange Server. He has been awarded the Microsoft MVP award, every year since 2007. He is active in the Microsoft community and User Group Leader for CoLabora (a danish UC & Cloud User Group). He works as an Cloud & Infrastructure Architect and Consulent, with primary focus on Exchange, Office 365, Azure and Skype for Business.

8 Comments

  1. Thank you for this write up! I had the exact same issue. A OWA Scratchpad folder prevented us from deleting the public folder on the old exchange 2007 box. Now we can decom it cleanly and continue on with exchange 2010.

  2. Pingback: remove public folders from exchange 2007 | Bart Vincke's Blog

      • I still get errors removing the remaining folders:

        Cannot delete the object ‘\NON_IPM_SUBTREE\SCHEDULE+ FREE BUSY\EX:/o=MYORG/ou=Exchange Administrative Group
        (FYDIBOHF23SPDLT)’. Please make sure that you specified the correct identity and that you have the correct permissions
        to delete it.

        I am a full admin on the server so I don’t think that permissions would be a factor.

        • I managed to get around this and thought I’d post the solution in case anyone had encountered this before:

          1. You have followed Microsofts documentation about deleting public folders and moving replicates all to one server.
          2. You attempt to remove all of the system public folders but are unable to.

          What I did was i dismounted the public folder, renamed the folder, and created a new empty folder with the name as the original one. Then I remounted the database and it reconfigured as an empty public folder database, after this I was able to remove the database from the server.

  3. Below Steps Worked for us…

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

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

    Public Folder Database
    Failed
    Error:
    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.

    ——————————————————–
    OK
    ——————————————————–

    Resolution:

    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.
    3. 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! 🙂

    Regards,
    Kiran Kore

Leave A Reply

Copyright 2005-2015 - Peter Schmidt.