Issue

Uninstall of Exchange 2007 fails with error:

The public folder database <database_name> cannot be deleted.
The public folder database  <database_name> contains folder replicas. Before deleting the public folder database, remove the folders or move the replicas to another public folder database.

Solution

  • Open Exchange Management Shell (EMS)
  • Change current folder to: C:\program files\Microsoft\Exchange Server\v14\Scripts
  • Run: .\MoveAllReplicas.ps1 -Server <old_server_name> -NewServer <new_server_name>
  • Wait for replication to complete. This can take some hours depending on your Public Folders size.
  • You can confirm that there is no more replica by running: Get-PublicFolderStatisctics –Server <old_server_name>
    One replication is completed this should not return any data

Note: Quite often it is suggested to resolve this issue by running something similar to:
Remove-PublicFolder -server  <old_server_name> -Recurse -ErrorAction:SilentlyContinue
Be careful, as this will delete all Public Folder replicas from all servers in the organization! Only use if you removing the last Exchange Server or no longer wish to use public folders.


No comments

Leave your comment

In reply to Some User
Captcha Image