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
To move the arbitration mailboxes, type following cmdlets.
[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -Arbitration | New-MoveRequest -TargetDatabase "DB01"
To view the status of move request, type following cmdlet in EMS.
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
To move monitoring mailboxes, type following cmdlet.
[PS] C:\Windows\system32>Get-Mailbox -Database "Mailbox Database 2095368010" -Monitoring | New-MoveRequest -TargetDatabase DB01
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
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
Now go back to EAC, and delete the mailbox database.
Click Yes on confirmation page. Then you will get a warning message as shown below.
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.
You may also like -
Latest posts by Bipin (see all)
- Install Exchange 2019 in Windows Server 2019 - November 28, 2020
- Why Backup your Microsoft Office 365 - November 27, 2020
- What’s New in VMware vSphere 7 - September 18, 2020