Reprovision all databases in Exchange 2013 for disaster recovery scenarios

Recently I had to perform disaster recovery on an Exchange environment. It required me to remove all DB’s (it’s in a pre-migration phase so no worries here) and create new databases. After removing all additional databases, the first database couldn’t be removed, due to still existing mailboxes hosted in the first mailbox database. ECP didn’t show these mailboxes, but PowerShell did. It turned out to be the:

  • Exchange Arbitration mailboxes
  • Exchange Discovery Search Mailbox

So first I had created a new set of target databases called “MailDB0#“, # being 1 – 3.

To move the arbitration mailbox (which are actually quite a few hidden mailboxes), you have to do the following:

Get-Mailbox -Arbitration | New-MoveRequest -targetDatabase MailDB01

This will move all arbitration mailboxes to MailDB. Next, you’ll have to move the Exchange Discovery Search mailbox. Find and move it with the following command:

Get-Mailbox “*discovery*” | New-MoveRequest –targetDatabase MailDB01

This will move the discovery mailbox, which is the last mailbox in the original – corrupted – database. Now remove the database, either through ECP or PowerShell and remember this will NOT clean up the EDB and LOG folders. So go ahead and do that manually.

Now you’re ready to use migration scripts to create new mailbox moves.

Remember, this was for a pre-migration phase, so no production data is lost and the choice for this scenario was pretty much a no-brainer. However, for a production environment you WILL need to be absolutely certain about having valid backups!

Good luck!

Leave a reply

Your email address will not be published. Required fields are marked *