Error Removing Mailbox Database: This Mailbox database contains one or more mailboxes.
When you try and remove an “Exchange Mailbox Database” you received the following error:
“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>.”
What does this mean ? , even if you have moved all the mailboxes from the Mailbox Database, Exchange still has mailboxes which is called “Arbitration” mailboxes and since Exchange 2013 Public Folder are now a mailbox as well. To know more about the “System Mailboxes” click here.
So how do we check for these Mailboxes ? , To get a list we can run the following commands.
Lets start by having a look if there is any “Arbitration” mailboxes on mailbox database EXHDB06.
1 |
Get-MailboxDatabase EXHDB06 |Get-Mailbox -Arbitration |
As we can see there is no “Arbitration” mailboxes on this database so lets move on to see if there is any “Public Folder” mailboxes on the database , to verify run the following command.
1 |
Get-MailboxDatabase EXHDB06 |Get-Mailbox -PublicFolder |
Based on the results from the above command we have found the “Problem Child” , Lets go ahead and move this mailbox to newly created mailbox database.
To check the status of the “Move-Request” run the following command.
1 |
Get-MoveRequest |Get-MoveRequestStatistics |
Now that we have moved the “Public Folder” mailboxes to another database we can attempt to go ahead and remove the “Mailbox Database” now. Before we run the remove database command we need to dismount the database again.
1 |
Dismount-Database -Identity EXHDB06 -Confirm:$false |
After Dismounting the database we can now go ahead and remove the “Mailbox Database“.
1 |
Remove-MailboxDatabase -Identity EXHDB06 -Confirm:$false |
Note that the “Warnings” indicate that you can now manually remove the “.edb” files as well as remove the “Monitoring Mailbox” active directory user object.
#ThatLazyAdmin
Be First to Comment