Site icon Franky's Web

Exchange 2016: Remove / delete database

Deleting an Exchange database requires more than just moving the user mailboxes to a new database. Exchange databases also contain system mailboxes that are not displayed in the EAC.

When trying to delete or remove an Exchange database, the following error message appears:

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 . 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 get a list of all Audit mailboxes in this database, run the command Get-Mailbox -Database -AuditLog.

As already mentioned at the beginning, these are system mailboxes. The mailboxes are visible via the Exchange Management Shell and must also be moved to another database:

The monitoring mailboxes (HealthMailbox) can be moved to another database with the following command:

Get-Mailbox -Database FWDB1 -monitoring | New-MoveRequest -TargetDatabase FWDB

After all monitoring mailboxes have been moved, you can check whether there are any other system mailboxes in the database to be removed:

get-mailbox -Database fwdb1 -Monitoring
get-mailbox -Database fwdb1 -AuditLog
get-mailbox -Database fwdb1 -Archive
get-mailbox -Database fwdb1 -RemoteArchive
get-mailbox -Database fwdb1 -PublicFolder
get-mailbox -Database fwdb1 -Arbitration
get-mailbox -Database fwdb1 -AuxAuditLog
get-mailbox -Database fwdb1 -GroupMailbox

If there are other mailboxes, these can also be moved with a MoveRequest. The status of the MoveRequest can be checked with the following command:

Get-MoveRequest | Get-MoveRequestStatistics

Sobald alle Moverequest den Status „Completed“ haben, können die Moverequest mit dem folgenden Befehl entfernt werden:

Get-MoveRequest | Remove-MoveRequest

The database can now be removed:

Get-MailboxDatabase FWDB1 | Remove-MailboxDatabase

The database files are not deleted and must be deleted manually.

Exit mobile version