Public Folder Replicas Prevent Uninstall Exchange 2007

When you try to uninstall Exchange 2007 from your server, you may receive some error messages which indicate that there is still some Public Folder on the machine thus meaning the uninstall process fails. We have received a lot of these issues recently. It is caused by the Exchange 2007 server containing some public folder replicas. We should remove the replicas as well as the public folder store before we can uninstall Exchange 2007 properly.

For the detailed steps to remove public folder replicas and the public folder store, please refer to the following article.

How to remove Exchange 2007 from a computer;EN-US;927464


Comments (37)

  1. Anonymous says:

    I ran the commands from my Exchange 2010 server against my last Exchange 2007 server but the replicas persist. I'm lest with the following.

    Default Public Folders > Internet Newsgroups.

    System Public Folders > Events Root

                                             > Offline Address Book (with three subfolders)

                                             > SCHEDULE+ FREE BUSY (with two subfolders)

    All of these folders/subfolders have replicas. When I select the replica, click the X to delete it, then click OK or Apply, it complains that I need to have a replica. I really want to kill off Exchange 2007. Ideas?

  2. Cpuroast says:

    The KB only says how to move replicas to another server.

    Not remove them completely if you are permanently removing exchange.

  3. Anthony says:

    Yep, this article only moves the replicas.

    Is there no way you can uninstall exchange??????

  4. charlie says:

    Your help sucks. I really need to remove exchange permantently.

  5. wang says:

    1.  Please keep at least one administrator mail box to remove public folder first!

    2.  From Exchange 2007 shell command

    run following 3 commands:

    Get-PublicFolder -Server <your server name>  "" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server ex2007 -Recurse -ErrorAction:SilentlyContinue

    Get-PublicFolder -Server <your server name>  "Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server EX2007 -Recurse -ErrorAction:SilentlyContinue

    Disable-Mailbox  all mail box in last Exchange 2007

    3. Remove your Exchange 2007 from add/remove

  6. Eric says:

    Wang you help workt just GREAT!!!

    there where only 2 typo’s

    Get-PublicFolder -Server <your server name>  "" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <your server name>  -Recurse -ErrorAction:SilentlyContinue

    Get-PublicFolder -Server <your server name>  "Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <your server name>  -Recurse -ErrorAction:SilentlyContinue

    if you replace <your server name>  with the name of your server all works fine (need to replace it 4 times)

  7. la_bruin says:

    Thanks, Wang and Eric

    Your help did work (I used the corrected scripts that Eric published)

  8. velfir says:

    So gret job, many thanks Wang, uninstalling was a really pain in my ass, with your command it’s as easy as unintsalling office .

  9. Marcel says:

    These commands finaly makes it happen to remove exchange 2007! Thanks! Just what I was looking for for a long time.

  10. Craig says:

    I tried the commands, with the chnages that Eric made, and I am still unable to get this off of my server. I am ready to nuke the server completely and start from scratch.

  11. David says:

    Wang you rock you are the bomb final some one that knows his stuff

  12. Dwayne Farmer says:

    Wang o de tango! You are my Hero too – I completely destroyed one system and had to re-install from bare metal before I found this thread. The second un-install went smooth as Silk thanks to these commands!

    Thanks a BUNCH!

  13. wally says:

    Thanks Wang. you are a life saver

  14. Shuyang says:

    Thanks Wang. I had wasted some days to remove exchange  2007.

  15. Eric says:

    Thanks Wang, I too have been trying to get Exchange 2007 off my server. Microsoft assumes that you will never need to completly get this thing completly off your server, I guess. Your trick worked perfectly.

  16. Dan_IT says:

    Do these steps only remove the Replicas on that one Public Folder server, or do these steps remove the folders from ALL Public Folder servers?

  17. Chas K says:

    Just tried the commands listed and they remove the public folders and their content from all replicas not just the server being decomissioned!

    I know how to remove the server from the replica lists of the folders – that works fine and aftwer ~15 mins the folders are removed only from the server to be decomissioned. However what is left behind is the IPM_Sub_Tree folders – how do you deal with these?

    Isn’t E2007 Fun!

  18. Miguel-Angel says:

    Cool, I could uninstall my Exchange 2007 SP1 that was installed in Windows 2008.

    Thank you


  19. Ken says:

    THis works GREAT!  Just be patient and place all spaces, dashes and lowercase/Uppercase exactly

  20. Aayush says:

    Hey thanks buddy… these scripts really works…

    removing exchange was really a overehead…

    Thanks a lot !!!

    Bye…  🙂

  21. EricB says:

    I have the same issue listed above.  The scripts given, I believe, remove all public folders in the organization.  I am interested only in getting the system folders off one this one system so that I can remove the public folder store.  I don’t want to harm any other servers.  Does anyone have a fix for that?

  22. Randw says:


    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.  

  23. Yvel says:

    EricB, you're right that's exactly what's happening here too. every time we run these commands it completely delete all the public folders in the organization. then i had to use ExFolder to recover the folders. I've yet to find a true method to remove the replicas from only the Exchange 2007 machine. Please if anyone have more info, please share. Thanks

  24. Yvel says:

    Like most of my posting, shortly after posting it, I found something that actually worked. It  required to delete something from ADSI EDIT. but worked like a charm..…/quick-tip-removing-exchange-2007-error-with-public-folder-replicas

  25. Bannywhey says:

    Thanks! Took ages to find this but saved it somewhere safe.


  26. Matt H says:

    For those of you who do not want to remove the public folder but just want to remove the replica, you can do this using the Public Folder Management Console as explained here:…/bb691120(v=exchg.141).aspx

  27. Dennis says:

    Excellent life saver .. thanks for the commands.

  28. Adam Hawk says:

    Thanks Wang and Eric. Your instructions saved me a lot of aggravation.

    The most important instructions is maybe the first one (1.  Please keep at least one administrator mail box to remove public folder first!). Without this, the other instructions won't work.

    Thanks again.

  29. Ron says:

    Thanks Wang, that did the trick! I was struggeling for far too long before I found this thread!

  30. The_Prisoner says:

    Awesome thanks for that worked a treat. 🙂

  31. CoralBayCC says:

    Wang and Eric, you absolutely rock!

  32. Daniel says:

    Genius, so simple after hours of trying to find a solution! Thankyou thankyou

  33. Daniel says:

    I’m referring to Wang’s advice. Just brilliant.

  34. Juan PAblo Vargas says:

    Thanks Wang

  35. james says:

    Worked Great, Wang

  36. Sean says:

    Very helpful! Thanks for sharing!

  37. Al says:

    Thanks for the info. Came in handy