IT Blog

Tech Blog

Decommissioning an Exchange 2010 Server from the Domain/Forest

exchange-2010-logoThis blog is an instructional on how to remove Exchange 2010 Server from a domain, where it is not the last Exchange in the domain.

The case scenario in this instance is a replacement exchange server. The previous exchange server is configured as a mail server with the roles of Transport, Client Access and Mailbox. The new server has been configured and attached to the domain with the various roles included and the mailboxes have been moved from the old store to the new store.

Step 1
One of the mailboxes that may not have been moved is the ‘Discovery Search Mailbox’, this mailbox can be moved, or deleted and recreated. In this instance I have moved the ‘Discovery Search Mailbox’ to the new store.

For more information you can refer to the Technet article – http://technet.microsoft.com/en-us/library/dd298014.aspx

Step 2
The first major step is to see if the old mail store is ready for removal. Check to see if the mailbox is completely empty, you can do this via the Exchange Management Shell with the following command:

Get-Mailbox -Database "Insert Old Database Name e.g Mailbox Database 0040516585"

This should show no information and have a command prompt under it. If this was the first Exchange server created we need to check for hidden system mailboxes. This can be done via the following command;

Get-Mailbox -Database "Insert Old Database Name" -Arbitration | fl name, alias

These are system mailboxes and are hidden as they are only used for internal system processes.

For more information refer to the following Technet article –  http://technet.microsoft.com/en-us/library/dd297936(v=exchg.150).aspx

Use the following command to move these mailboxes to the new Data Store:

Get-Mailbox -Database "Insert Old Database Name" -Arbitration | New-MoveRequest -TargetDatabase "Insert New Database Name"

Check to see if the system mailboxes have been removed if so you can then proceed to deleting the old Mail Database.

Step 3
Use the following command to remove the Database of the old server:

Remove-MailboxDatabase "Insert Old Database Name"

Sometimes this process does not go smoothly and there are active ImportMailbox requests still pending. These can be checked and removed with the following shell commands:

Check
Get-MailboxImportRequest | ?{$_.RequestQueue -eq "Insert Old Database Name"}

Remove Completed
Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest

Remove Failed
Get-MailboxImportRequest -Status Failed | Remove-MailboxImportRequest

If there is a failed move request, remember to check the database to make sure these actually have been moved.  Also, a check of OWA, while the old database is dismounted is another good way to be sure. This should now allow the Database to be deleted.

Step 4
Send Connectors can stop the uninstall process, a quick check of the Organisation Configuration > Hub Transport > Send Connectors to make sure no send connectors are set to the old Exchange Server. If one is established, change the configuration to the new Exchange Server.

Step 5
Remove the Exchange 2010 program. The quickest way to accomplish this is to click Start and type appwiz.cpl. This will bring up the Add/Remove Programs from the Control Panel. Click on Exchange 2010 uninstall and remove the ticks from all the check boxes. With the press of the Next key Exchange 2010 is now uninstalled off this server.

Author: Adam Sheridan