Microsoft Exchange and Remote Desktop Services Specialists

SEMblog

Microsoft Exchange Server and
Blackberry Enterprise Server news, views and fixes.

Removing a Database from Exchange 2010, 2013 and 2016

If you have attempted to remove a database on Exchange 2010 and higher, no doubt you will have seen this error message:

 

"This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or arbitration mailboxes, Audit mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database . 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 -Archive. To get a list of all public folder mailboxes in this database, run the command Get-Mailbox -Database -PublicFolder. To get a list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database -Arbitration. To get a list of all Audit mailboxes in this database, run the command Get-Mailbox -Database -AuditLog. To disable a non-arbitration mailbox so that you can delete the mailbox database, run the command Disable-Mailbox . To disable an archive mailbox so you can delete the mailbox database, run the command Disable-Mailbox -Archive. To disable a public folder mailbox so that you can delete the mailbox database, run the command Disable- Mailbox -PublicFolder. To disable a Audit mailbox so that you can delete the mailbox database, run the command Get-Mailbox -AuditLog | Disable-Mailbox. Arbitration mailboxes should be moved to another server; to do this, run the command New-MoveRequest . If this is the last server in the organization, run the command Disable-Mailbox -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox. Mailbox plans should be moved to another server; to do this, run the command Set-MailboxPlan -Database ."


This is probably one of the most useless errors in Exchange. It doesn't list all of the command required to check the database is empty, it also listed commands not available in the on premise version of Exchange.

 

The list of commands to check, is as follows:

 

get-mailbox -database "Databasename"

get-mailbox -database "Databasename" -archive

get-mailbox -database "Databasename" -arbitration

get-mailbox -database "Databasename" -publicfolder

get-mailbox -database "Databasename" -monitoring

get-mailbox -database "Databasename" -auditlog

 

Where "Databasename" is the name of the database you are trying to remove and not all commands work on all versions of Exchange.

 

If any of those come back with results, then you need to move the mailbox off:

 

Get-Mailbox -Database "Mailbox Database 1" -AuditLog | new-moverequest –targetdatabase "Mailbox Database 2"

 

After allowing the domain to replicate, you should then be able to drop the database.

Comments are closed