Let’s say you are in process of removing the last copy of a mailbox database or uninstalling an Exchange server and run into the following error message:
“This mailbox database contains one or more mailboxes…”
You check again and again but can’t find a mailbox on the server being uninstalled or the database you are deleting, but the error continues haunting you!!
Sounds familiar? Ran into this before? Read on!
Let’s take the example of DB2, a database present on an Exchange Server 2013 that I am trying to remove and am getting the error:
As suggested by the error message, I verified for the presence of all sorts of possible mailboxes one can create, namely normal user mailboxes, arbitration mailboxes, public folder mailboxes and archive mailboxes.
Checking for regular mailboxes reveals nothing:
Checking for Archive mailboxes reveals nothing:
Checking for public folder mailboxes reveals, you guessed it, nothing:
Finally, checking for Arbitration mailboxes gives similar results:
Still, the removing mailbox database continues failing with same error. What to do? Do I need a flamethrower?
If you are using Exchange 2013, you can use the Remove-MailboxDatabase as it indicates the DN of the user that still has mailbox on the database, but only when -Verbose parameter is specified. Like so:
If you do not have Exchange Server 2013, don’t despair…
Another possibility is that the database you’re trying to remove is an Archive Database for a mailbox residing on a different mailbox database.
The following command helps you list mailboxes using a specific database as Archive Database:
Get-Mailbox | where {$_.ArchiveDatabase -eq "<databaseName>"}
Here’s the output from my example:
Aha! Mystery solved! So, I just moved the archive mailbox to another database:
…And the database could now be removed after the move was complete.
We realize that the experience here is not ideal and the relevant team is aware. In the meantime, hope this helps some of you.
Bhalchandra Atre