none
Uninstalling Exchange Server 2016 RRS feed

  • Question

  • Well, it's that time again, folks - Fall is in the air, and it's time once again to re-ask the age old question: how does one go about removing an installed Exchange 2016 Server (just one, not the whole Exchange footprint in the domain)?

    Yes, I said Exchange 2016. There don't appear to be any forums for 2016 yet, so I'm posting here.

    I assumed that it might be similar to Exch 2013, so I've been through the forums, TechNet, various Exchange support websites, etc. etc. etc. and I know all about hidden mailboxes such as Arbitration, Archive and the infamous Undead Mailboxes that stay around after you've moved or deleted a regular Mailbox until you purge them.

    There are none of these in the Database for the server in question, I've checked.

    So you'd think I should be able to Uninstall Exchange 2016 now.

    Ah, but you'd think wrong. No dice. I still get this error:

    Error:
    Uninstall can't continue. Errors:
    This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database <Database ID>. To get a list of all mailbox plans in this database, run the command Get-MailboxPlan. To get a list of archive mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Archive. To get a list of all public folder mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -PublicFolder. To get a list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Arbitration. To disable a non-arbitration mailbox so that you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID>. To disable an archive mailbox so you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID> -Archive. To disable a public folder mailbox so that you can delete the mailbox database, run the command Disable-Mailbox <Mailbox ID> -PublicFolder. Arbitration mailboxes should be moved to another server; to do this, run the command New-MoveRequest <parameters>. If this is the last server in the organization, run the command Disable-Mailbox <Mailbox ID> -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox. Mailbox plans should be moved to another server; to do this, run the command Set-MailboxPlan <MailboxPlan ID> -Database <Database ID>. It was running the command 'Remove-MailboxDatabase 'CN=Database_I_Want_To_Remove,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=OurCorporateEmail,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=our-domain,DC=net' -whatif'.
    For more information, visit: http://technet.microsoft.com/library(EXCHG.160)/ms.exch.setupreadiness.UnwillingToRemoveMailboxDatabase.aspx
    
    

    The only differences between this and the age-old question asked many times before, are: a) it's Exchange 2016, and b) therefore, the TechNet help link in the error text leads to an empty entry because the help for 2016 hasn't been populated yet.

    I did a little checking and found some Monitoring Mailboxen:

    [PS] C:\Windows\system32>get-mailbox -server theserverinquestion -monitoring
    
    Name                      Alias                ServerName                 ProhibitSendQuota
    ----                      -----                ----------                 -----------------
    HealthMailbox4db3fb7c7... HealthMailbox4db3... theserverinquestion        Unlimited
    HealthMailboxcd3c70388... HealthMailboxcd3c... theserverinquestion        Unlimited
    HealthMailboxf4067dcec... HealthMailboxf406... theserverinquestion        Unlimited
    HealthMailbox68c35ced4... HealthMailbox68c3... theserverinquestion        Unlimited
    HealthMailbox9825cd1b3... HealthMailbox9825... theserverinquestion        Unlimited

    And while I see a few references to Health mailboxes around the web, no one gave a clue as to whether those are like Arbitration (etc.) mailboxen; i.e., must they be removed also before deleting a database?

    I tried to remove one via its GUID, but I am told "access denied" even though my Admin account has all the admin permissions available via Exchange.

    So, help? How in the heck to I delete this damn server? I am completely stumped.

    And somewhat amazed that, after all these years, there isn't an automated process to successfully remove an existing Exchange server without poking around for hours in Powershell.

    Any help at all on this topic would be greatly appreciated.


    "I'm anispeptic, frasmotic, even compunctual to have caused you such pericombobulation."

    Monday, October 12, 2015 9:41 PM

Answers

  • Hi,

    It seems that it was either AD replication delays or Exchange clean up/maintenance tasks that needed to run before this removal was possible.

    Good that it's sorted now. 

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010

    Blog: http://markgossa.blogspot.com

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    • Marked as answer by Aliphatic Tuesday, November 3, 2015 6:25 AM
    Friday, October 16, 2015 12:07 AM

All replies

  • Hi,

    Before deleting a mailbox database, you need to ensure that there are no mailboxes. To do this, the instructions are in the error message which is a generic error message seen in Exchange 2010 - 2013:

    1. Run Get-Mailbox -Database <Database ID> and either disable the mailboxes using Disable-Mailbox or move them to a database on another server using New-MoveRequest.
    2. Run Get-Mailbox -Database <Database ID> -Archive and either move to another database or remove the archive mailbox
    3. Run Get-Mailbox -Database <Database ID> -Arbitration and move these to a database on another server.
    4. Run Get-Mailbox -Database <Database ID> -PublicFolder and either disable it or move to another server.

    More information here: http://blogs.technet.com/b/exchange/archive/2014/03/17/this-mailbox-database-contains-one-or-more-mailboxes.aspx. Let me know if you have any questions.

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010

    Blog: http://markgossa.blogspot.com

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    Monday, October 12, 2015 11:09 PM
  • Mark,

    Thanks for the reply.

    Sorry if it wasn't clear from my original post, but I already did all of those things. Got Nothing. Nada. Zip. Bupkis. None. Of. Those. Things. Work.

    In case you're wondering:

    [PS] C:\Windows\system32>get-mailbox -database Local_Test_Server_II
    [PS] C:\Windows\system32>get-mailbox -database Local_Test_Server_II -Archive
    [PS] C:\Windows\system32>get-mailbox -database Local_Test_Server_II -Arbitration
    [PS] C:\Windows\system32>get-mailbox -database Local_Test_Server_II -PublicFolder
    [PS] C:\Windows\system32>

    Sorry if I sound peeved, but I guess I'm tired of trying and failing to hit the sweet spot between TL;DR and "There's not enough info in your post, why didn't you tell me that?!?"

    Any other suggestions, or perhaps, ways in which 2016 is somehow different from 2013?


    "I'm anispeptic, frasmotic, even compunctual to have caused you such pericombobulation."

    Tuesday, October 13, 2015 12:28 AM
  • Try not to delete Monitoring mailbox, but to disable it, like in Exchange 2013

    Get-Mailbox -Monitoring | Disable-Mailbox

    btw, you need to disalbe Audit mailbox too.

    Get-Mailbox -Audit | Disable-Mailbox

    • Edited by _NoirFry_ Tuesday, October 13, 2015 8:35 AM
    Tuesday, October 13, 2015 8:09 AM
  • Hello,

    Have you checked the following blog and check if the solution works for Exchange 2016:

    http://blogs.technet.com/b/exchange/archive/2014/03/17/this-mailbox-database-contains-one-or-more-mailboxes.aspx


    Thanks,

    Simon Wu
    TechNet Community Support

    Tuesday, October 13, 2015 3:02 PM
    Moderator
  • _NoirFry_,

    Thanks for the suggestion.

    Unfortunately, that didn't do it. Now, it gives me an error that there are still message copies in the Shadow mailbox.

    Is it possible to disable Shadow redundancy on this server, so I can shut it down and remove it?


    "I'm anispeptic, frasmotic, even compunctual to have caused you such pericombobulation."

    Tuesday, October 13, 2015 3:36 PM
  • Simon,

    Thank you for your reply.

    That was one of my (several) earlier attempts; a good read, but didn't help, unfortunately.


    "I'm anispeptic, frasmotic, even compunctual to have caused you such pericombobulation."

    Tuesday, October 13, 2015 3:59 PM
  • Hi,

    Please can you check the HomeMDB attribute on your users doesn't reference the mailbox database you are trying to delete. Command below requires AD tools/PowerShell module installed.

    Get-ADUser -Filter * -Properties HomeMDB | ? {$_.HomeMDB -match "mailbox database"}
    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010

    Blog: http://markgossa.blogspot.com

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    Tuesday, October 13, 2015 9:20 PM
  • [PS] C:\Windows\system32>Get-ADUser -Filter * -Properties HomeMDB | ? {$_.HomeMDB -eq "Local_Test_Server_II"} [PS] C:\Windows\system32>

    No, unfortunately, nobody seems to think they should be in that database.

    But I hadn't tried that yet, so thanks for the suggestion.


    "I'm anispeptic, frasmotic, even compunctual to have caused you such pericombobulation."

    Wednesday, October 14, 2015 2:57 AM
  • Hi,

    Please can you try delete the mailbox using PowerShell using the -verbose switch as this displays more information about mailboxes which are still in the database:

    Remove-MailboxDatabase Database2 -Verbose

    It should show a GUID for each mailbox that is still in the database and we can investigate further from there. Apologies if you have already tried this.

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010

    Blog: http://markgossa.blogspot.com

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    Wednesday, October 14, 2015 12:30 PM
  • Mark,

    Here's the weird part - I had actually tried removing the database with the verbose switch.

    But, after all this mucking about in the database, I decided to try it again - and it mysteriously just worked. The uninstall is now running, but it's almost done.

    Sorry to anyone out there looking to this thread for an answer (if any such people exist), but - I'm afraid I don't have one.

    Well, chalk one up to the mysteries of Exchange, I guess.

    Thanks to all the above folks for the suggestions.


    "I'm anispeptic, frasmotic, even compunctual to have caused you such pericombobulation."

    Thursday, October 15, 2015 6:11 AM
  • Hi,

    It seems that it was either AD replication delays or Exchange clean up/maintenance tasks that needed to run before this removal was possible.

    Good that it's sorted now. 

    Thanks.


    Please mark as an answer if this answers your question

    Mark Gossa

    MCSE 2003, MCITP Enterprise Administrator 2008 R2, MCSA 2012 R2, MCTS Exchange 2010

    Blog: http://markgossa.blogspot.com

    Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

    • Marked as answer by Aliphatic Tuesday, November 3, 2015 6:25 AM
    Friday, October 16, 2015 12:07 AM
  • Hello Mr. Mark Gossa,

    I am having a similar issue trying to uninstall MS Exchange 2016.  I actually was able to finally completely delete the mailbox database, but I continued to received notification that the database still existed, same as the issue reported here.  Unfortunately, I did try to perform a scheme prep, but could not figure out how to get that to work, so I downloaded the very latest version of Exchange 2016 (Cumulative Update 1 Setup), and tried to install it and now my problems are much worse, as the install simply dies when an OWA Virtual Directory entry creation is attempted by the installer, and it dies there with a massive error. 

    I understand that the situation is that I have a faulty "Default Web Site" in IIS (there is a question mark on it, because I installed Windows Server 2012 R2 on an existing Exchange Server), but I can NOT simply remove the IIS role and then add it again, as I have already created a dozen sites under IIS (which took a very, very long time, due to the massive learning curve), and I do not wish to have to go through that again.

    Therefore, I believe my only option is to somehow get Exchange 2016 to successfully complete installation, so that I can start on trying to remove it again.  As ridiculous as this sounds, it is Microsoft which has caused this incredibly bad issue, by simply NOT allow people to install Exchange on a domain controller for one thing (there is a warning yes, but I didn't know it would be this bad), and then not simply allowing us to just REMOVE Exchange in a simple way, without having to completely remove all of these mailboxes which I didn't make in the first place (I am guessing that the install made all of the mailboxes, so why doesn't the UNINSTALL REMOVE THEM)?  This is really bad.  Please help!

    Monday, June 13, 2016 2:05 PM
  • Also, can you please email me at beatinger@gmail.com and not use the beatinger@hotmail.com email, because I never use it, but could not login without it.

    Perhaps if you could tell me how to completely backup my entire IIS installation parameters/data, and then remove and re-install my IIS role, I could finally get Exchange removed.  I really need help here.  I have been working on this now for 5-days, without getting anywhere.  Thank you so much!

    Monday, June 13, 2016 2:08 PM
  • I had this issue too.  After many hours I finally found an AuditLog mailbox was hiding in the database that needed to be moved:

    Get-Mailbox -Database DB01 -AuditLog | New-MoveRequest -TargetDatabase DB02

    • Proposed as answer by Charlie Echo Thursday, February 16, 2017 9:10 PM
    Sunday, November 20, 2016 9:37 AM
  • @ndfan77, That was my last hurdle.  Thanks for sharing!
    Thursday, February 16, 2017 9:35 PM
  • Note:

    this sometimes isn't quite enough... keep searching for hidden mailboxes, including the arbitration one.

    that one insists on being moved, rather than disabled... so we moved it to another server's database, and then the "remove database" worked... and uninstall began...

    Thursday, October 19, 2017 3:49 PM