Posted by: Andy Grogan | August 21, 2007

Quick Tip – Removing Exchange 2007 – Error with Public Folder Replicas…

I have been working on Exchange server in a lab for a little while, and today I decided that I wished to take my testing a stage further which involved removing my current, very basic installation of Exchange 2007 from the server I have been working with.

Before I ran the Exchange 2007 Setup utility I removed all of my 1000 Exchange mailboxes from the OU that I had setup in my test lab using the following command: Get-Mailbox -OrganizationalUnit “Infrastructure.local/Exchange-Users” -ResultSize Unlimited | Remove-Mailbox

I then disabled the Administrators accounts mailbox using the following command: disable-mailbox administrator

I then deleted the instance of the Offline Outlook Address Book that I had been using in the ESM, along with the additional Exchange Databases and Storage groups, as I hadn’t been using any connectors I did not have to find or remove these.

It was at this point that I thought I would remove Exchange from the server, so I went to “Add Remove Programs” in the Control Panel and selected Exchange 2007 and then Remove.

The setup process began, and as expected performed its initial inspection of whether the Exchange installation was suitable for removal – but when checking the Mailbox role setup failed with the following error message;

Mailbox Role Prerequisites

Failed

Error:

Uninstall cannot proceed. Database ‘Public Folder Database’: 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.
Recommended Action:
http://go.microsoft.com/fwlink/?linkid=30939&l=EN&v=ExBPA.3&id=b6e3b32a-8848-46cb-9567-72288ac15f60

I thought ok, no management interface in this version of Exchange for Public Folders, so there must be a management interface command that will work, so I opened up my trusty friend Google and did a search and found the following commands:

Get-PublicFolder -server XEON “\” -Recurse -ResultSize:Unlimited | Remove-PublicFolder -server XEON -Recurse -ErrorAction:SilentlyContinue

Get-PublicFolder -Server XEON “\Non_Ipm_Subtree” -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server XEON -Recurse -ErrorAction:SilentlyContinue

Both commands seemed to run fine (obviously I might not see any specific processing errors due to the “SilentlyContinue” switch) – however when I returned to Remove Exchange I ran into exactly the same error message.

I suspected that perhaps some replicas had been missed by the Management Command – but I was running short of time and really needed to remove the Exchange Installation from the Machine so I thought – perhaps I could just remove the reference to the Public Folder from Active Directory.

So I broke out my trusty copy of ADSI Edit (which can be downloaded from here) and navigated to the following entry:

CN=Folder Hierarchies,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=<Your Organisation>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=<your Domain>,DC=<Dot Com>

For visual reference it may look the following in ADSI Edit:

When I had this key selected the right hand pane of ADSI Edit changed to display the following value:

I Right clicked on that value and then chose “Delete” from the context menu.

I then navigated to the following key in ADSI Edit:

CN=First Storage Group,CN=InformationStore,CN=<Your Server>,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=<Your Organisation>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=<your Domain>,DC=<dot Com>

Which in terms of a visual representation looks like the following:

When I had this key selected I saw the right hand pane of ADSI Edit change to look like the following:

I then right clicked on the correct entry for my Public Folder Database and then chose “Delete”.

It was then I re-ran Exchange setup, and on this occasion it worked perfectly.

 


Responses

  1. You are the best!! I have been looking for a solution to this for two days and Microsoft had nothing. my situation was the same.. just checking out the product and was having trouble getting it to uninstall.

    Thanks

  2. [...] and expand the testing so I decided to un-install the test version of Exchange 2007 that I had see here for one issue that I ran into during the un-installation process and then install a Virtualisation Product on the DL580 [...]

  3. Wow, where was this article about 3 weeks ago when i was having this same exact problem with my Exchange 2k3 deployment.

    Now i am having problems with removing a failed mailbox server from the org…..
    man i am ready to go back to exchange 5.5…..

  4. Oh. My. God.
    You are THE man …
    I don’t quite know what I would have done without this little tidbit of information …
    You saved my life … thankyou .. thankyou … THANKYOU!!!!

    ~Natalie.

  5. Fantastic – thank you for your help.
    Looks like M$ is just getting out of beta on this peice. It make me sad. And why is it easier to use linux commands in powershell than their new lexicon?

  6. Hi,

    your adsi edit program does not work on my exchange 2007 server.

  7. Complimenti.
    Ritengo la miglior soluzione in circolazione

  8. Works great. Took me a day to find this solution! Nat says it all!!

  9. Many, many thanks to you, sir — you just provided me with an answer that several hours of Googling did not yield.

    And for those of you who are looking for a bit more information about ADSI Edit, here’s the place that I grabbed my copy from:

    http://www.computerperformance.co.uk/w2k3/utilities/adsi_edit.htm

    -= ASPNYC =-

  10. very glad i came upon this
    your a genus

  11. You’re the Dude man!

    Three hours of googling…and finally your steps worked.

    Just an FYI the ADSI Edit which you had uploaded doesn’t seem to work for some reason.I got it from the 2003 CD\Support\Tools folder.

    Thanks again!

    Cheers,
    Harish

  12. HERO!!!… can’t believe how long this took until i stumbled onto this page…

    if i was gay i’d kiss you right now :)

  13. Great in-depth post, I will pass this URL on

  14. Great post! I had been struggling with the same problem for what seems like ages until I finally hit on this solution.

  15. Thanks man u save me long days sitting at the table. You are the best.

  16. Very Very helpful!! Thanks!

  17. Well done! Great job in pulling it together! It saved my butt! Drop me a line and the beer is on me!

  18. When I wake up well-rested tomorrow morning, I’ll have you to thank for this fix. This has been on my plate for a week, and I’m eternally grateful that you posted the solution to this issue. Thank you, thank you, thank you!!!

  19. I agree with everyone – THANK YOU. I’ve been trying to get 2K7 off my domain all day, and the ADSI edit did the trick.

    The MS KB articles had me going in circles, uninstalling the “official” way.

    I’m glad to have this bloatware off my network (though I admit, OWA was seeeeexxxxxyyyy!!! :P )

  20. Make sure you register the .dll file

    ============
    cmd prompt
    c:\location of .dll file
    then regsvr32 asdiedit.dll
    ============

    now the snap in should work.

    Thanks so much for the help Im also glad to see it go.

  21. Took me forever before I found this! You are WONDERFUL – if you were right here – I would give you a hug!!!
    I have been working to remove this – mixed in with other projects – over the past week! Had followed all of the MS KB articles how to “remove” the folder – Have tried other steps as well – They all appeared to work, but, still could not uninstall. Until now. THANK YOU!

  22. Just wanted to add my thanks for this fix :) .

    Stupid you cant uninstall exchange 2007 without going into adsi edit. I’m getting rid of 2007 bloatware and going back to the 2003 version which works great.

    I nearly made a mistake though so just wanted to warn people not to delete their 2003 public store database entries! Its not so clear on the instructions. Always choose your 2007 Container!

  23. Just want to add my thanks. I was able to remove most of it except for the hub transport. Keep telling me that unable to locate my server. If you can help me with this, I would be really appreciate.

    The error I get when try to uninstall the Hub Transport Role, “Exchange server “servername.domain.com” was not found. Please make sure you have type correctly.

    Because of it, I can not reinstall Exchange on my box.

    Thanks

  24. hi,

    this article was very helpful. I ran on the same problem and luckil, i get through this site and followed the instructions.

    I have another problem and hope you can give me some help.

    I have an OWA setup on exchange server 2003, published through ISA 2004. We are using RSA securID on that OWA website.

    No, we are about to test/validate another form of authentication solution, so we need to create another OWA Website wherein users will log-in using the credential from that other authentication solution.

    I was told that can create multiple OWA website on the same server, that I need to modify the OWA and create a virtual directory but I dont know how to do this.

    So, if you can give step by step procedure on how I would do this.

    Thanks.

  25. My sincere gratitude! Thank you!

  26. Hi,

    Does this means that I must re-install Exchange Server 2007 ?

    my current Public Folder is pointed to wrong database location, therefore I can’t remove it :-|

  27. Ohh Man!

    You are the best .. realy I mean it.. you saved my life.. you solution worked like a magic

    RGDS
    Tanvir

  28. Dead on! Thanks, Dude! I’ve been struggling with this for many hours and this did it! I thought that it was just me!

  29. Terima Kasih banyak a.k.a Thank You Very Much My Friendddd, you light up my desperate way man!!!

  30. Wow. I have been working with this issue while trying to uninstall exchange role & demote a 2007 x86 machine for a week.

    Thanks for the clear ADSI paths. That is what i needed.

    You the man.

  31. GRAZIE !!!

  32. Thanks dude!

    The provided ADSI tool work by the way. Just unzip the two files in a folder and register the DLL. (e.g. regsvr32 adsiedit.dll)

  33. Seriously I was fighting with this for a couple hours, thank you very much.

  34. Thank You Very Much!!!!:)

  35. Great Job Dude. Yes, it works fine.

  36. thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you! thank you!
    SOOOO MUCH!!!!!!

  37. You saved my life tooo!

  38. you’ve saved the day. thanks :)

  39. thank you very much dude!!!!!1

    greetings from Curacao Netherlands Antilles

    visit . http://www.curacao.com

    thank you thank you

  40. Andy Grogan for Presidient ‘08 !!!!!

  41. Thanks!

  42. Hey, very good info. This worked great after I spent hours trying to remove the Exchange organization from my systems. Nice work!!!

  43. Thanks man, the problem took my precious lunchtime and then some… Was going round and round MSoft in vain for hours…

    You tha man!

  44. Thanks! It works for me.
    It was a real headache!

  45. Excellent stuff man….. you rock..

  46. Dude, My God!!!!!!!!!

    If ever you are in sunny South Africa, you MUST give me a shout. I need to meet the man that saved my ass.

    All drinks on me. Heroes should never pay for drinks!!!!!!!!

  47. Thank you so much for this tip!! I see you helped many people!! Great job!

    I would have been working on this forever without your help!

  48. You are my hero, I have been working on this for two days. My ADSI structure was already mising the first edit, I removed the second and uninstall worked like a charm. Thank you!

  49. You are the boss:)

    after so much of circus to rremove the database,

    you have solution was utimate

    Thanks a ton….

  50. Like a broken record…..

    This was awesome!!!! Been working on this for a while.

    Thanks again!

  51. You rock, thanks so much for that…….

  52. Mate You’re a genius!

  53. [...] kommt mir bekannt vor. Ich hab damals adsiedit zur Hand genommen. Hier ist das auch beschrieben. Quick Tip – Removing Exchange 2007 – Error with Public Folder Replicas… telnet 127.0.0.1 25 Aber bitte beachten, das ist afaik von MS nicht supported. Wenn es also kritisch ist, solltest du [...]

  54. [...] интернете полно советов использовать в данном случае утилиту ADSIEdit, но лично у [...]

  55. Well, just the trick, I’ve been looking for.
    I’ve got to hand it to you, son!
    Well done.

  56. Hats off to you , even all the way from nairobi, kenya. This was flawless. After an entire day of just googling.
    P.S, Technet is crappy on this issue.

  57. Many thanks for this, I used your tip to remove Exchange2007 from a SBS2008 install. SBS2008 already has adsiedit.msc installed so I just ran that and then followed your advice.

  58. I’ve been scratching my head on how to get exchange off of my soon to be decommissioned SBS 2008 server. Your “quick tip” solved an error message exchange was throwing at me when trying to uninstall!

    THANK YOU!!

  59. Just wanted to say a big thankyou !!!

  60. You solved my problem,

    Thanks a lot. ..

  61. you are exchange GOD
    What a POS 07 is
    went through 3/4 of a migration until we figure out that their journaling sucks compared to 03
    Al emial gets dumpled into a mail box as an attachment. What a joke

  62. Thanks for the info, unfortunately the test server was in a production Org. and I’ve now deleted my production Public Folder Heirarchy. I’m totally screwed….

  63. In fact, if anyone here can tell me how to either restore the Public Folder Hierarchy object or recreate it in order to see all the public folders again that would be much appreciated!!!

  64. You are God!! Thanks!

  65. thanks so much for this info.
    its 23:51 and this just saved my life…

  66. Thanks man, you saved me a lot of time. Perfect Guide, and it worked perfectly for my ex2007 organization.

  67. Вот про это я почитал с превиликиминтересом. И прочитал бы еще больше! Планируете и в дальнейшем писать на эту же тему? Спасибо


Leave a response

Your response:

Categories