Unable to remove Exchange 2007 because of Public Folder Replica.

Published:
Updated:
1) While uninstalling Exchange server, an error was shown in Exchange setup logs.

[]1] Checking whether the public folder database "Server Name\Storage Group Name\Public Folder Database" has local replicas.
[]1] [ERROR] Unexpected Error
[ERROR] The public folder database "Server Name\Storage Group Name\Public 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] Ending processing.
[]1] [ERROR] Uninstall cannot continue. Database 'Public Folder Database': The public folder database "Server Name\Storage Group Name\Public 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.

2) To completely uninstall Exchange 2007 server - Need to follow link.
http://technet.microsoft.com/en-us/library/bb123893.aspx

3) Refer link http://technet.microsoft.com/en-us/library/aa997893.aspx (Cannot remove public folder database)

4) Using Get-PublicFolderStatistics -identity servername to check local replica (few would always be found if entire PF migration has not taken place).

5) Using script .\RemoveReplicaFromPFRecursive.ps1 local replica could be removed
(this should be ideally located under C:\Program Files\Microsoft\Exchange Server\Scripts)

6) However, upon running step 4, if there is no progress. In this case local replicas list can be modified using PFDavadmin tool. To use this tool need to remove "require SSL" from Public Folder and ExAdmin virtual directory under IIS console.

7) Downloaded PFDAvAdmin from link
www.microsoft.com/downloads/details.aspx?FamilyId=635BE792-D8AD-49E3-ADA4-E2422C0AB424

8) Removed Replica manually of all Public folder at one instance in bulk

Open PFDavadmin.exe - click on File - Connect - Connect to the local Exchange server 2007.
a) Right Click on "Public Folder"
b) Select Propogate Replica List
c) click ok for dialogue box
"Since this folder has no replica list, you will now be prompted to choose one or more public stores"
d) Select your E2k7 PF store database (on window "Add Replica").
e) Check box your E2k7 server and check the radio button "Remove" - Click ok.
f) Repeat this step with "System Folder"

9) At this moment all Public folder and system folder replica should be removed.

10) However, at this moment if the replica list hasn't been removed and the error still persists of database consists of replica.

11) Ensure that all public folders have been replicated. This can be verified by checking

a) PF Database size (source and destination)
b) Get-PublicFolderStatistics (source and destination)
c) Checking if System folders (example OAB, Free/Busy function smoothly under ownership of destination servers)

12) Take system state backup using NTBackup tool.

13) Install Windows Support tools.

a) Go to Start - run - type Adsiedit.msc
b) Follow the following destination.

CN=Storage group (which owns PF Database),CN=Information Store,CN=,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC= Domain>,DC=

c) Right click delete PF Database.

(Remember, the above step should be taken when the above database is not going to be used in future - since once this database is removed, only method to restore this is by using system state backup)

14) once deleted the PF Database, Exchange could uninstalled succesfully.
7
25,360 Views

Comments (3)

Commented:
Thank you for prepping this.

Having struggled to remove a simple public folder from a single server exchange environment, it all came down in the end to point 13 and adsiedit.

Once the container was deleted i could uninstall Exchange 2007!

Thanks, C
Top Expert 2012

Commented:
Hi ExchangeGeek...sorry but can you explain this location better?

CN=Storage group (which owns PF Database),CN=Information Store,CN=,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC= Domain>,DC=

I don't see an option at the top level of ADSIEDIT that shows CN=Storage group(which owns PFDatabase) - where does this appear in the list exactly? I'm in Configuration context - is that the right one?
Thanks
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

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.

Get access with a 7-day free trial.
Continue Growing Your Skills and Your Career
  • Interact with leading experts on your specific technology problems.
  • Receive the guidance of experienced professionals.
  • Learn from troubleshooting others have experienced.
  • Gain knowledge from a library of courses, all included.