Can't remove Ex2k7 public folders.
I've got two Ex2k7 MBX servers, one of which i'm trying to decommission. The mailboxes have been moved and i've run the "move all replicas" powershell script for the public folder replicas. I performed the latter step a couple of times over the last two or three days. When i try to uninstall Exchange, i get the 'can't delete while replicas exist' error.Now here's the rub... Using the PF Management Console i added the column "replicas" to the default view. I went folder by folder, system and default public folders, and i verified that the old server isn't found in any of the replica servers.We've been native Ex2k7 for a couple of years now (Ex2k3 removed long ago.) SP2 is installed on all servers.I've already looked through all of the "troubleshooting replication" articles i can find from the Exchange Team Blog and Microsoft. No luck there.Any help/advice/suggestions are greatly appreciated.jim
March 1st, 2010 9:41pm

Take a look at this article: http://msexchangetips.blogspot.com/2006/07/exchange-cannot-delete-public-folder.html
Free Windows Admin Tool Kit Click here and download it now
March 1st, 2010 10:41pm

A couple of things regarding this fix..In the first screen capture he references this value and says to delete it..CN=Public Folders msExchPFTreeI checked the properties of this value and the only server it references is the new one; the one i want to keep. Still delete the value?More importantly, he references another two values in the second screen capture..CN= Mailbox DatabaseCN= MyPubI checked the same containing folder on my end (Servers --> ServerName --> Information Store --> Public Folder store) and found NO values to delete.I'm a little uncomfortable about deleting a value like that, especially when the other don't exist.Help?
March 1st, 2010 11:41pm

Sorry, I can see how that may have been confusing...Ok, run adsiedit and naviagate to Configuration -> Services -> Microsoft Exchange -> OrgName -> Administrative Groups -> First Administrative Group -> Servers -> YourServerName -> Information Store -> Storage Group When you highlight the storage group in the left column do you not see the public folder database in the right column?
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 12:15am

Yes, i see the folder, but no values inside as per the article.If you email me at blinkyjesus at hotmail dot com, i'll send you a screen cap of what i'm seeing.
March 2nd, 2010 12:34am

Hey blinky, I edited my original post with a link to instructions that are a little more clear. Check it out and let me know if that makes more sense.
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 3:59am

(Also sent to your email address..)My only question is whether or not this will affect any other public folder stores in the org. I just want to remove a single MBX server and i know that (for instance) running "remove-publicfolder" deletes public folder content from all servers, not just the one you want to remove. I'm sure you've experienced that sick feeling in your gut when you make what you think is a targeted change to a single system, only to start getting calls from the business that all sorts of other exchange-related things don't work anymore. The value has to be removed from ADSI edit and there's no export/import safety net like with the windows registry.
March 2nd, 2010 5:11pm

I just want to remove a single MBX server and i know that (for instance) running "remove-publicfolder" deletes public folder content from all servers, not just the one you want to remove. I'm sure you've experienced that sick feeling in your gut when you make what you think is a targeted change to a single system, only to start getting calls from the business that all sorts of other exchange-related things don't work anymore. The value has to be removed from ADSI edit and there's no export/import safety net like with the windows registry. You can run remove-publicfolder with -server parameter, which will insure that target server is what u want it to be. If you are getting error that PF Replica exists while u try to uninstall MBX server then u can do: 1- Run MoveAllReplicas.ps1 2- Wait for 15 mins 3- Remove the PFs on your target server with -Server parameter 4- uninstall the MBX server I have done it like this few times and it was done without any problems. Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 5:22pm

Thanks Laeeq, but as i mentioned in my original post, i tried running the MoveAllReplicas script several times over the course of a few days. I agree that it *should* work, but as i research this more i'm discovering that this issue isn't unique to me.The same is true with "remove-publicfolder" and the -server switch. When i run the command it spits out the same error about replicas existing on the target store.
March 2nd, 2010 5:28pm

Hi, As you have moved the replicas to the new server i would suggest to dismount the PF store on the old exchange server for a while(2 to 3 bussiness days) and check that there are no issues from the business. After you confirm this you can go ahead and delete the public folder from adsiedit as suggested by Mike and than go for the decommissioning of the MBX server. Mahendra
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 5:40pm

The article Mike referenced refers to an FE server. That is, Exchange 2003. This is Ex2k7.
March 2nd, 2010 5:49pm

Thanks Laeeq, but as i mentioned in my original post, i tried running the MoveAllReplicas script several times over the course of a few days. I agree that it *should* work, but as i research this more i'm discovering that this issue isn't unique to me.The same is true with "remove-publicfolder" and the -server switch. When i run the command it spits out the same error about replicas existing on the target store. I think here u r talking about "Remove-PublicFolderDatabase" instead of "Remove-PublicFolder" bcoz it is "Remove-PublicFolderDatabase" which spits the Replica error. After moving Replicas u have to remove the Public Folders on MBX server as i mentioned in above post. I also was getting Replica exists error when I tried to remove PF DB after running the MoveAllReplicas.ps1 but I succeeded by doing what I mentioned in above post. What I dont remember is "Whether I removed the Public Folders after few mins or 15 mins of Moving Replicas. I guess I removed the Public Folders in 3 or 4 mins after moving the Replicas, and then waited for about 15 mins, and then removed the Public Folder Database. I would suggest that u should attempt it last time. Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 5:55pm

Ok, so if i run get-publicfolder against the old server, i get this...AgeLimit :EntryId : 000000001A447390AA6611CD9BC800AA002FC45A030092 0CD9A2A9C5604BA3A6E806E0D7F11C0000000000010000HasSubFolders : TrueHiddenFromAddressListsEnabled : FalseIssueWarningQuota : unlimited (InheritFromDB)LocalReplicaAgeLimit :MailEnabled : FalseMaxItemSize : unlimited (InheritFromDB)Name : IPM_SUBTREEParentPath :PerUserReadStateEnabled : TrueProhibitPostQuota : unlimited (InheritFromDB)Replicas : {}ReplicationSchedule : {}RetainDeletedItemsFor :UseDatabaseAgeDefaults : TrueUseDatabaseQuotaDefaults : TrueUseDatabaseReplicationSchedule : FalseUseDatabaseRetentionDefaults : TrueIdentity : \IsValid : TrueOriginatingServer : OldServer.Company.comAre you saying that the next command should be "remove-publicfolder -identity \"?
March 2nd, 2010 6:41pm

Removing PF from adsiedit should also work for exchange 2007. Check the below link as well. http://social.technet.microsoft.com/Forums/en-US/exchangesvrdeploy/thread/47166fac-ebf3-42d9-bec3-ca6423f0e427 Mahendra
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 7:39pm

Ok, how about this...Get-PublicFolder -Server OldServer "\" -Recurse -ResultSize:unlimited | Remove-PublicFolder -Server OldServer -RecurseWould this command remove "\" and all its subfolders from the entire org, or just from that one server ("OldServer")? The reason i ask is because i tried it with the -whatif switch and it just showed what would be deleted, but NOT whether it would be from the entire org or just OldServer.
March 2nd, 2010 7:39pm

Yes, that removes the servers from the entire organization. Try this: Get-PublicFolderStatistics -Server OldServer Remove OldServer as a replica from all folders under \. Remove OldServer as a replica from all folders under \NON_IPM_SUBTREE under the Offline Address Book, Free-Busy, and Organizational Forms containers. You may delete all others folders under \NON_IPM_SUBTREE that have replicas only on OldServer, or you can replicate those to other PF servers if you're afraid to do so. You want Get-PublicFolderStatistics -Server OldServer to come up null so you can remove the public folder database.-- Ed Crowley MVP"There are seldom good technological solutions to behavioral problems.". "blinkyjesus" wrote in message news:de34a82c-94dc-40c0-874a-63000dd5a6ee...Ok, how about this...Get-PublicFolder -Server OldServer "\" -Recurse -ResultSize:unlimited | Remove-PublicFolder -Server OldServer -RecurseWould this command remove "\" and all its subfolders from the entire org, or just from that one server ("OldServer")? The reason i ask is because i tried it with the -whatif switch and it just showed what would be deleted, but NOT whether it would be from the entire org or just OldServer. Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 10:03pm

Ok, how about this...Get-PublicFolder -Server OldServer "\" -Recurse -ResultSize:unlimited | Remove-PublicFolder -Server OldServer -RecurseWould this command remove "\" and all its subfolders from the entire org, or just from that one server ("OldServer")? The reason i ask is because i tried it with the -whatif switch and it just showed what would be deleted, but NOT whether it would be from the entire org or just OldServer. Yes it will remove the PFs from the Old server only. When u give -Server u are telling the command to target this server. Also run this comtmand after above command to delete system PFs too. Get-PublicFolder "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited -Server OldServer | Remove-PublicFolder -Recurse -ErrorAction:SilentlyContinue -Server OldServer Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
March 2nd, 2010 10:06pm

So it *will* remove it from ALL the servers in the org?? Laeeq says no, you say yes.Incidentally Ed, OldServer wasn't a replica on any of these folders, that's why i started this thread. Uninstall says replicas exist, but they don't.In this article it says i need to use the "set-publicfolder -replicas" command to delete items from a specific server and not the entire org.http://technet.microsoft.com/en-us/library/bb201664(EXCHG.80).aspx"The Remove-PublicFolder cmdlet will remove the public folder data from all servers in your organization. If you only want to remove data from one server, use the Set-PublicFolder –replicas command. For more information, see Set-PublicFolder. "Unfortunately i'm not sure what the powershell syntax would be. Any suggestions?
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 10:10pm

So it *will* remove it from ALL the servers in the org?? Laeeq says no, you say yes.Incidentally Ed, OldServer wasn't a replica on any of these folders, that's why i started this thread. Uninstall says replicas exist, but they don't.In this article it says i need to use the "set-publicfolder -replicas" command to delete items from a specific server and not the entire org.http://technet.microsoft.com/en-us/library/bb201664(EXCHG.80).aspx"The Remove-PublicFolder cmdlet will remove the public folder data from all servers in your organization. If you only want to remove data from one server, use the Set-PublicFolder –replicas command. For more information, see Set-PublicFolder. "Unfortunately i'm not sure what the powershell syntax would be. Any suggestions? Yes I think Ed is right, Remove-PF will remove all public folders on a server + replicas existed on other servers. I didnt know u were talking in the context of saving the replicas and removing the PFs on a particular server. Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
March 2nd, 2010 10:30pm

Remove-PublicFolder does just that, it removes the public folder. Not the replica. The ENTIRE FOLDER. Don't do that unless that's what you want. Seriously, use the scripts to manage replicas. They work and they're a lot easier than specific PowerShell commands except in the simplest environment. To move all public folders between one server and another, you cna do this: Get-PublicFolder -Server OldServer -Identity \ -Recurse -ResultSize:Unlimited | Set-PublicFolder -Replicas OldServer,NewServerGet-PublicFolder -Server OldServer -Identity \NON_IPM_SUBTREE -Recurse -ResultSize:Unlimited | Set-PublicFolder -Replicas OldServer,NewServer The second command does more than you really need to do since a lot of the system public folders are server-specific. You can move just the ones under the Offline Address Book, Free-Busy and Organizational Forms (if you use them) containers if you want. Then wait a while for replication to complete. After replication completes, you can then do this: Get-PublicFolder -Server OldServer -Identity \ -Recurse -ResultSize:Unlimited | Set-PublicFolder -Replicas NewServer Get-PublicFolder -Server OldServer -Identity \NON_IPM_SUBTREE -Recurse -ResultSize:Unlimited | Set-PublicFolder -Replicas NewServer Actually you should be able to just do this last pair of commands, but I always do it the way I described it here because I don't trust the replication black box.-- Ed Crowley MVP"There are seldom good technological solutions to behavioral problems.". "Laeeq Qazi" wrote in message news:34252320-38ba-49fa-93ab-93ac9e973eee... Ok, how about this...Get-PublicFolder -Server OldServer "\" -Recurse -ResultSize:unlimited | Remove-PublicFolder -Server OldServer -RecurseWould this command remove "\" and all its subfolders from the entire org, or just from that one server ("OldServer")? The reason i ask is because i tried it with the -whatif switch and it just showed what would be deleted, but NOT whether it would be from the entire org or just OldServer.Yes it will remove the PFs from the Old server only. When u give -Server u are telling the command to target this server. Also run this comtmand after above command to delete system PFs too. Get-PublicFolder "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited -Server OldServer | Remove-PublicFolder -Recurse -ErrorAction:SilentlyContinue -Server OldServer Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2010 10:59pm

I did use the scripts, and waited a day or two, then ran them again. ..But uninstall still barked about replicas. Like i said, i'm not the first person to see this behavior.In any event, i mustered up the courage and followed this link:http://msexchangetips.blogspot.com/2006/07/exchange-cannot-delete-public-folder.htmlExchange is uninstalling as we speak, so i guess it worked. Only thing left to do is cross my fingers and hope it doesn't effect anything else.Thanks to all who contributed to this discussion!jim
March 2nd, 2010 11:05pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics