KB ID 0001414
Problem
Every iteration of Exchange comes up with some new system/hidden mailbox type that stops me deleting mailbox databases!
[box]
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>.
[/box]
Solution
OK, I’m assuming you don’t actually have any mailboxes in the database? The following will tell you;
[box]Get-Mailbox -Database “Database-Name“[/box]
If you are running Exchange 2016 you might have an AudiLog account;
[box]Get-Mailbox -Auditlog -Database “Database-Name“[/box]
Or a Monitoring Mailbox
[box]Get-Mailbox -Monitoring -Server “Server-Name“[/box]
For 2013 (and older) the likely culprits are Arbitration, Archive, or Discovery Search mailboxes, (the latter you need an extra command to see).
[box]Get-Mailbox -Auditlog -Database “Database-Name” -Arbitration
Get-Mailbox -Auditlog -Database “Database-Name” -Archive
Set-AdServerSettings -ViewEntireForest $true
Get-Mailbox -Database “Database-Name“[/box]
To move a Discovery Search Malbox
[box]Get-Mailbox DiscoverySearchMailbox* | New-MoveRequest -TargetDatabase “Target-Database“[/box]
Also Exchange 2013 or Newer may have one or more Public folder mailboxes;
[box]Get-Mailbox -PublicFolder | New-MoveRequest -TargetDatabase “Target-Database“[/box]
I Can’t Find Anything and it still Wont Let Me Delete the Datastore?
Well, there’s two things you can do;
1. On a Domain Controller, 0pen ADSIEdit.msc and Connect to ‘Configuration’. Navigate to Configuration > Services > Microsoft Exchange > {Organisation name} > Administrative Groups > {Administrative-Group-Name} > Databases >Delete the database from here (BE CAREFUL CHECK TWICE, DELETE ONCE!). Then have a coffee refresh you datastore view and the offender will disappear.
2. With the database dismounted, move its .edb file to another folder, then mount the store, it will complain and ask if you want to mount and empty store > select ‘yes’ > You can then delete it.
Related Articles, References, Credits, or External Links
NA