Scenario: You are trying to remove the last Public Folder Database in your Exchange 2010 Organization, but you are receiving this error when running: Remove-PublicFolderDatabase EXPF1
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.
Solution: Run the following commands to deleted the PF Folders and then try to remove the public folder database again:
Public Folders:
Get-PublicFolder -Server Ex2010Srv1 “” -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server Ex2010Srv1 -Recurse -ErrorAction:SilentlyContinue
System Public Folders:
Get-PublicFolder -Server Ex2010Srv1 “Non_Ipm_Subtree” -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server Ex2010Srv1 -Recurse -ErrorAction:SilentlyContinue