Friday, September 20, 2013

Unable to delete Exchange Server 2010 mailbox database with no arbitration mailboxes shown

Problem

You attempt to remove a mailbox database but receive the following error:

image

The mailbox database '<Mailbox Database Name>' cannot be deleted.

--------------------------------------------------------
Microsoft Exchange Error
--------------------------------------------------------
The mailbox database 'SomeName - Mailbox Database' cannot be deleted.
SomeName - Mailbox Database
Failed
Error:
This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, or arbitration 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 arbitration mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Arbitration. 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. 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>.

--------------------------------------------------------
OK
--------------------------------------------------------

image

You attempt to use the Arbitration switch to see if there are any arbitration mailboxes left on the database but the output does not show any:

[PS] C:\Windows\system32>Get-Mailbox -Database "SomeName - Mailbox Database" -Arbitration

image

Solution

In situations where you have a forest with multiple domains and the mailbox database you’re unable to delete is located in a child domain, you will need to use the:

Set-ADServerSettings -ViewEntireForest $true

… cmdlet prior to running:

Get-Mailbox -Database "SomeName - Mailbox Database" -Arbitration

… in order to view the arbitration mailboxes such as SystemMailbox and FederatedEmail:

[PS] C:\Windows\system32>Set-ADServerSettings -ViewEntireForest $true
[PS] C:\Windows\system32>Get-Mailbox -Database "SomeName - Mailbox Database" -Arbitration
Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
SystemMailbox{1f05a927... SystemMailbox{1f0... abcmbx01         unlimited
SystemMailbox{e0dc1c29... SystemMailbox{e0d... abcmbx01         unlimited
FederatedEmail.4c1f4d8... FederatedEmail.4c... abcmbx01         1 MB (1,048,576 bytes)

[PS] C:\Windows\system32>

image

With the arbitration mailboxes now shown, proceed with moving them to another database with the cmdlet:

Get-Mailbox -Database “<Some Mailbox Database Name>” -arbitration | New-MoveRequest -TargetDatabase “<SomeOther Mailbox Database Name>” 

image

… and then try to delete the mailbox database again:

More information about the Set-AdServerSettings cmdlet can be found at the following TechNet article:

http://technet.microsoft.com/en-us/library/dd298063(v=exchg.141).aspx

No comments: