Wednesday, February 3, 2016

Removing Default Exchange 2016 Database

I finally got around to working on my lab and getting the latest and greatest installed. The first order of business was to get current on Exchange and decommission both Exchange Server 2010 and 2013. Both of these uninstalled without a hitch. 

After all the configurations were done it was time for a little clean up (mostly because I am a little neurotic with things like that). Namely getting rid of the first default database. No problem right? Well I hit a road block almost immediately after moving the archive and arbitration mailboxes getting the following error. 
Now I will admit it didn't take long to find the solution but I did have to dig a little. Not having done 2016 up till this point and not reading too much on it (my own fault I know) I discovered one of the new items within 2016 is the Mailbox Audit logging mailbox. While this has been around since Exchange Server 2010 it was not contained in a system mailbox by default. More information can be found in the Exchange Server 2016 Technet article.

So running the Get Mailbox -Database "Default DB name" -auditlog | FL name,alias,servername,database command I was finally able to see where the problem was in deleting the mailbox database as can be seen in the following graphic. 

Next up now was simply to move this last mailbox. This can be done with Get Mailbox -Database "Default DB name" -auditlog | New-MoveRequest -TargetDatabse "Database Name", once this was initiated I monitored the move request, with Get-MoveRequest and upon completion I removed the move request and was able to delete the mailbox. 

Hopefully this will help someone trying to remove the default database. 

P.S. As a side note rather than removing the database entirely it can be re-named and the path can be moved as well. This may be preferable for some administrators. Once the Database is re-named within the EAC, dis-mount the database and from the EMS run the following. Move-DatabasePath -Identity "DatabaseName" -EdbFilePath "path\DBname.edb" -LogFolderpath "path\logfolder"

1 comment:

tsoorad said...

I like the "rename" the default database option.