Skip to content

Removing the default Exchange 2010 Mailbox-Database

17. March 2011

When you try to remove the default Exchange 2010 Mailbox-Database you get the following error:

[PS] C:\Windows\system32>Remove-MailboxDatabase -Identity “Mailbox Database 0042864039” 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 move
d 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>.    + CategoryInfo          : InvalidOperation: (Mailbox Database 0042864039:DatabaseIdParameter) [Remove-MailboxDatabase], AssociatedUserMailboxExistException    + FullyQualifiedErrorId : 69BB660C,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveMailboxDatabase
image

If you now check the Mailboxes on the Database no Mailboxes are shown – but there are still some hidden System-Mailboxes. With the following command you can see these System-Mailboxes:

“Get-Mailbox -Database “Mailbox Database 0042864039” -Arbitration | ft -wrap –auto”
image

Move these Mailboxes with the following command to a new Database (replace the identity with the identities which are shown in your enviroment – and the “TargetDatabse” with a valid one in your enviroment):
”New-MoveRequest -identity  “SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}”  -TargetDatabase “Mailbox Database 0668101183″”
image

After these moves are finished you can delete the original Database without any error.

From → Exchange, Microsoft

3 Comments
  1. Thanks for this, saved me a world of grief when trying to delete the default mailstore

  2. Perfect! could not get rid of the mailboxdatabase with the extreme long name 🙂

  3. Bernie permalink

    Thanks, i couldn’t move the databases without the -wrap command, now i can see the full name…

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: