Delete Default Mailbox Database in Exchange 2016

Share This Article: Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0Pin on Pinterest0Email this to someone

When you install Exchange 2016, a default mailbox database is created automatically. This database is created in default Exchange installation location. The default mailbox database name is automatically created which doesn’t meet any naming convention. So you have few options to get the mailbox database name right. First, you can rename the database which is most straight forward. To rename the mailbox database open the properties of database in EAC and edit the name. This won’t rename the .edb database file. To change the .edb file name, dismount the database and run the cmdlet, Move-DatabasePath –Identity “NewDBName” –EdbFilePath “<path>\NewDBName.edb. Then, mount the database with Mount-Database “NewDBName” cmdlet. You can also delete the default mailbox database and create a new one. In this post, I will show steps to delete default mailbox database in Exchange 2016.

Delete Default Mailbox Database in Exchange 2016

To view the default mailbox database location type following cmdlet,

[PS] C:\Windows\system32>Get-MailboxDatabase -Identity "Mailbox Database 2095368010" | fl *filepath*

EdbFilePath               : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 2095368010\Mailbox Database 2095368010.edb
MetaCacheDatabaseFilePath : C:\ExchangeMetaCacheDbs\Mailbox Database 2095368010\Mailbox Database 2095368010.mcdb\Mailbox Database 2095368010-mcdb.edb

In order to delete the default mailbox database, you need to move all the mailboxes from default mailbox database to new mailbox database. At first, create a new mailbox database. Then, move all user mailboxes to new database. Type following cmdlet to move all mailboxes from default mailbox database to DB01.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" | New-MoveRequest -TargetDatabase DB01

Then move arbitration mailboxes. To view arbitration mailboxes type following cmdlets in EMS.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010"  -Arbitration

arbitration

To move the arbitration mailboxes, type following cmdlets.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -Arbitration | New-MoveRequest -TargetDatabase "DB01"

Delete Default Mailbox Database in Exchange 2016

To view the status of move request, type following cmdlet in EMS.

get-moverequest

Now, let’s move monitoring mailboxes. To view the list of monitoring mailboxes, type following cmdlet.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -Monitoring

monitoring mailbox

To move monitoring mailboxes, type following cmdlet.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -Monitoring | New-MoveRequest -TargetDatabase DB01

monitoring move

Now move AuditLog mailboxes. To view the list of AuditLog mailboxes, type following cmdlet.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -AuditLog

auditlog

Now move AuditLog mailboxes. Type following cmdlet to move AuditLog mailboxes as shown below.

[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -AuditLog | -TargetDatabase DB01

move auditrequest

Now go back to EAC, and delete the mailbox database.

Delete Default Mailbox Database in Exchange 2016

Click Yes on confirmation page. Then you will get a warning message as shown below.

OK on Warning

The warning says, you need to delete the database file from the location shown above if it exists. In this way, you can delete the mailbox database in Exchange 2016.

The following two tabs change content below.
Bipin is a freelance Network and System Engineer with expertise on Cisco, Juniper, Microsoft, VMware, and other technologies. You can hire him on UpWork . Follow Bipin Giri on Google+. Bipin enjoys writing articles and tutorials related to Network technologies. Some of his certifications are, MCSE:Messaging, JNCIP-SEC, JNCIS-ENT, and others.