How to Remove Public Folder Replicas?
I am unable to remove the Public Folder Database . Every time I try, I get the 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.
The public folder database has no Public Folders in it - it is completely empty. I've set replication to "Never" but I still get this error. The UI does not expose the replica list and the set-PublicFolder command does not
have a provision for having an empty parameter for the -Replicas switch.
I can't just simply delete the database itself since then the Exchange Uninstall will fail the pre-checks and won't uninstall and I need the roles removed, etc. from the registry.
Any help on this would be greatly appreciated.
October 13th, 2011 5:05am
Hi,
Try to use the moveallreplicas.ps1 script. This should remove the server name on all replicas.
http://technet.microsoft.com/en-us/library/bb331970.aspx
Leif
Free Windows Admin Tool Kit Click here and download it now
October 14th, 2011 4:29am
Hi
To use the Exchange Management Shell to remove a public folder database
Move any public folder replicas to another server, as described in the preceding procedure, or delete all the folders in the database by running both of the following commands:
Get-PublicFolder -Identity \ -GetChildren | Remove-PublicFolder -Recurse
Get-PublicFolder -Identity \ Non_Ipm_Subtree -GetChildren | Remove-PublicFolder -Recurse
To use the Exchange Management Shell to remove a public folder database, run the following command:
Remove-PublicFolderDatabase -Identity "My Public Folder Database"
To remove the last public folder database in an organization, run the following command:
Get-PublicFolderDatabase | Remove-PublicFolderDatabase –RemoveLastAllowed
October 14th, 2011 4:31am
as there is only one Exchange server, so I don't need to move replicas to another server . just implement the above all commands that is ok?
Free Windows Admin Tool Kit Click here and download it now
October 14th, 2011 5:22am
yeah
October 14th, 2011 5:24am
this command can't be run as some errors Get-PublicFolder -Identity \ Non_Ipm_Subtree -GetChildren | Remove-PublicFolder -Recurse
Free Windows Admin Tool Kit Click here and download it now
October 18th, 2011 5:18am
October 18th, 2011 5:28am
I faced this issue (Unable to remove emptied unused PF Database) as well in Exchange 2007 using EMC or EMS.
At first, we checked at the OAB to make sure "Enable public folder distribution" is not ticked.
Anyhow, the emptied unused PF Database has been removed successfully through ADSIEdit.
Bear in mind, it is not recommeded to use ADSIEdit if you are not sure what to remove.
Free Windows Admin Tool Kit Click here and download it now
October 20th, 2011 3:42am
I had this problem too, MoveAllReplicas.ps1 worked with no errors
Still I could not remove the server or its public folder databases.
My workaround:
- Dismounted the public folder database
- Renamed/moved its files (ebd+log)
- Mounted the database and said "yes" to the recreate warning
Now you have an empty database that can be removed
October 25th, 2011 5:18am
had the same issue with this script as kenaska. Use the Microsoft suggested commands on this page to remove both user and system public folders, and then you can remove the database. http://technet.microsoft.com/en-us/library/bb201664%28v=exchg.140%29.aspx
User Public Folders:
Get-PublicFolder -Server <server containing the public folder database> "\" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue
System Public Folders:
Get-PublicFolder -Server <server containing the public folder database> "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue
This worked to resolve my issue.
Free Windows Admin Tool Kit Click here and download it now
March 13th, 2012 8:37pm
had the same issue with this script as kenaska. Use the Microsoft suggested commands on this page to remove both user and system public folders, and then you can remove the database. http://technet.microsoft.com/en-us/library/bb201664%28v=exchg.140%29.aspx
User Public Folders:
Get-PublicFolder -Server <server containing the public folder database> "\" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue
System Public Folders:
Get-PublicFolder -Server <server containing the public folder database> "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue
This worked to resolve my issue.
---------------- STOP --------------------
DO NOT TRY THIS UNTIL YOU HAVE READ THIS
http://blogs.technet.com/b/bill_long/archive/2011/06/11/do-not-use-remove-publicfolder-to-remove-a-public-folder-database.aspX
AND FULLY UNDERSTOOD THE CONSEQUENCES.
Sharique 'W@rbuG' Ahmed. 2 b or not 2 b
March 26th, 2012 9:54pm