Monday, January 2, 2017

Remove Default Database-Exchange 2016

When we install Exchange server 2016, a default mailbox database is created automatically in default Exchange installation location and name is automatically created which doesn’t meet any naming convention. We have options to get the mailbox database as per our standard. First, we can rename the database which is simple to open the properties of database in EAC and edit the name but it won’t rename the .edb database file. To change the .edb file name, dismount the database and move the database new location,after that mount the database. we have another option to delete the default mailbox database and create a new one.

Here are the steps to delete the default mailbox database in Exchange 2016.

First view the default mailbox database location type following cmdlet

Get-MailboxDatabase -Identity "Mailbox Database 2095368010" | fl *filepath*

In order to delete the default mailbox database, first move all the mailboxes from default mailbox database to new mailbox database.

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 DB1.

Get-Mailbox -Database "Mailbox Database 2095368010" | New-MoveRequest -TargetDatabase DB1

To view the arbitration mailboxes with following cmdlet:

Get-Mailbox -Database "Mailbox Database 2095368010"  -Arbitration

Now move the arbitration mailboxes with following cmdlet

Get-Mailbox -Database "Mailbox Database 2095368010" -Arbitration | New-MoveRequest -TargetDatabase "DB1"

You can view the move request

Get-MoveRequest

Now view the monitoring mailboxes with following cmdlet

Get-Mailbox -Database "Mailbox Database 2095368010" -Monitoring

Move monitoring mailboxes to newly created database

Get-Mailbox -Database "Mailbox Database 2095368010" -Monitoring | New-MoveRequest -TargetDatabase DB1

Now view the AuditLog mailboxes

Get-Mailbox -Database "Mailbox Database 2095368010" -AuditLog

Move the AuditLog mailboxes to new database

Get-Mailbox -Database "Mailbox Database 2095368010" -AuditLog | -TargetDatabase DB1

Once all mailboxes move to new Database than delete the default mailbox database:

Go to EAC-->Database-->Select default mailboxe database than click on Delete, click the Yes on confirmation page, then you will get a warning message which will says, you have to delete the database file from location.

Cheers!

Happy Learning.

1 comment: