Problem
You attempt to delete an Exchange 2016 mailbox database but receive the following error:
error
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 <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 get a list of all Audit mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -AuditLog. 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. 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 <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>.
Attempting to use the cmdlet Remove-MailboxDatabase throws the same error:
Executing the following cmdlets does not reveal any other types of mailboxes that reside in the database:
Get-Mailbox -Database EMDB09
Get-Mailbox -Database EMDB09 -Arbitration
Get-Mailbox -Database EMDB09 -Archive
Get-Mailbox -Database EMDB09 -AuditLog
Get-Mailbox -Database EMDB09 -PublicFolder
Get-Mailbox -Database EMDB09 -Monitoring
Solution
One of the possible causes of this is if you have a mailbox that uses this database as an archive database. Below is an account that has the live mailbox in another database but uses this database we’re trying to remove as an archive database:
Executing the following PowerShell cmdlet would confirm this:
Get-Mailbox -Identity tluk | FL *archive*
An easier way to identify this if you don’t know which mailboxes may be using this database as an archive database is to execute the following cmdlet:
Get-Mailbox | where {$_.ArchiveDatabase -eq “EMDB09”}
If you are experiencing the issue above, simply move the archives left on this database to another database: