Thursday 9 April 2015

Removing a Mailbox Database with Exchange 2013

In order to successfully remove a mailbox database from Exchange the following conditions must be met:

- Dismount the mailbox database
- Remove all user mailboxes
- Remove all arbitration mailboxes
- Remove all user mailbox plans
- Remove all user archive mailboxes
- Remove all user public folder mailboxes

Firstly we will dismount the database:
Dismount-Database "database-name"

We will check and remove any mailboxes we can issue:
Get-Mailbox -Database Admin
Remove-Mailbox -Identity "user@domain.com"

We will now check the arbirtration mailboxes:
Get-mailbox -Database <database-name> -arbitration
Remove-Mailbox "mailbox-name" -Arbitration

We will now check the public folder mailboxes:
Get-PublicFolder <public-folder-name>
Remove-PublicFolder <public-folder-name>

We will now check the archive mailboxes:
Archive mailboxes are linked to the users main mailbox and therefore when their main mailbox is deleted there archive mailbox will be deleted with it.

And finally to remove the mailbox database we issue (make sure that you run the following command with an elevated Exchange shell!):

Remove-MailboxDatabase "mailbox-database"

and manually delete the mailbox database from the filesystem.

0 comments:

Post a Comment