There are times when an Exchange Mailbox Database is unavailable - wether it is missing or the underlying storage is unavailable. Recently, while visiting a customer, they asked about the best method for solving this issue when the old database does not need to be retrieved. There is a simple set of commands that can be used to move the path and generate a new, empty, .edb file.

To identify the the database to work with one can either use the Mailbox name or the Mailbox GUID. To obtain the GUID run the following Exchange Management Shell command:

<strong><em>Get-MailboxDatabase -Identity "MailboxName" | Format-Table Name, GUID</em></strong>

Taking the resulting GUID, or the Mailbox Name itself, it can be plugged into the Identity property of the following command:

<strong><em>Move-DatabasePath -ConfigurationOnly -Identity "GUIDorName" -EdbFilePath "C:\PathToEdb\FileName.edb" -LogFolderPath "C:\PathToFolder"</em></strong>

The -ConfigurationOnly property instructs the Exchange Management Shell to ignore the fact that it cannot find the current path or file. The above command without the -ConfigurationOnly property is identical to running the Move Database Path option within the Exchange Management GUI.

Once the above command is complete, the Mailbox database can be mounted at which time it will create a new, empty, .edb file in the new storage location.

This is a nice command to have in your brain bank when faced with a situation where the existing path for your mailbox stores cannot be contacted or you're restoring Mailbox databases to a new location.