Exchange 2016 Cannot Remove Mailbox Database

Exchange Mailbox Database

Issue

When trying to remove a mailbox database on an Exchange 2016 installation the operation fail with a message similar the following

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
. 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 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. 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 .

If you run a Get-Mailbox on the database you are trying to remove nothing is returned same for the following commands

Get-Mailbox

Get-Mailbox -Archive

Get-Mailbox -Arbitration

Get-Mailbox -PublicFolder

Solution

The remove mailbox database operation fails as Exchange 2016 audit mailbox which is enabled by default on the first database created during installation.

To be able to remove the mailbox database you first need to move the audit mailbox to another database

Get-Mailbox -AuditLog

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
SystemMailbox{8cc370d3... SystemMailbox{8cc... szhv-ex2k16      50 GB (53,687,091,200 bytes)

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

DisplayName               StatusDetail              TotalMailboxSize          TotalArchiveSize         PercentComplete
-----------               ------------              ----------------          ----------------         ---------------
SystemMailbox{8cc370d3... Queued                    0 B (0 bytes)                                      0

Once the audit mailbox has been moved you will be able to remove the mailbox database without any error

Remove-MailboxDatabase "Mailbox Database 1418726647"
Advertisements

One thought on “Exchange 2016 Cannot Remove Mailbox Database

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s