Decommissioning an Exchange Server is not just shutting down the server and dispose it of or delete the virtual machine. If another Exchange Server remains in the system, then there could be repercussions, such as issues with Active Directory, etc. In this article, we will be discussing the detailed process of decommissioning an Exchange Server 2019 from the current infrastructure.
Why you need to Decommission an Exchange Server 2019?
There could be many reasons why you would go through the process of decommissioning an Exchange Server. Below are some of the common reasons:
- You have a Database Availability Group (DAG) with various nodes and after consolidating the systems, you need to reduce the number of nodes.
- Migrating to a new hardware or moving to a newer operating system.
- Migrating to the Exchange Server Subscription Edition.
- Migrating the email and communication systems to Exchange Online.
- Merging two Exchange Servers after a merger or acquisition.
Things to Consider before Removing the Exchange Server
You cannot just remove the Exchange Server from the system as there are dependencies and configurations in the Active Directory Schema. Configuration of an Exchange Server resides in the Active Directory Schema and removing the server will cause issues to other Exchange Servers, which will remain in the system or which depend on the Active Directory Schema configuration. Such dependencies and configurations in the Active Directory schema involve:
- Stale Active Directory Objects from connectors, mailboxes, and other resources.
- Schema dependencies, which could make it challenging to introduce a new Exchange Server or upgrades.
- Misleading pointers, which could cause issues with mail flow and other management tools.
- Manual cleanup of the entries can cause irreparable damage to the Active Directory or even other Exchange Servers.
Stepwise Process to Decommission Exchange Server 2019
Below is the stepwise process for safely decommissioning an Exchange Server.
1. Review all the Virtual Directories
Exchange Server works with virtual directories. Although all the servers share the same external URL, each server has its own internal URL. These include the Exchange Web Services (EWS), Exchange Control Panel (ECP), Outlook Web Access (OWA), Offline Address Book (OAB), and others.
Note: This step is applicable when you have a cluster of servers and you are removing one. In case of standalone server, skip this step.
To check the virtual directories, log into the Exchange Admin Center (EAC) and click on the Virtual Directories tab from the Servers section. Here, you will see the list of all the virtual directories. Next, you need to confirm that both the internal and external addresses are working and accessible from outside. In addition, you should confirm that where the virtual directory of the Autodiscover service is pointing. You can use the below command to get the information.
Get-ClientAccessService | Select-Object AutoDiscoverServiceInternalUri
Once you have documented all the information, this can be used to verify that the decommission process is complete and the redirections have been done.
2. Get Information on all the Send/Receive Connectors
The custom send/receive connectors are not stored in the Active Directory Schema. These reside on the server where the connectors have been recorded. Connectors are used by various applications/devices to send emails, like multifunction printers to scan, security and alarm systems, and other notifications to be relayed through the Exchange Server.
In case you’re decommissioning only one node in the Database Availability Group (DAG) or a standalone server, you need to get information on all connectors so that these can be routed through another Exchange Server or Microsoft 365. Apart from having an inventory and cleanup of the connectors, it will give you a chance to review permissions and relay access.
The below command will give you information on all the send connectors in the system.
Get-SendConnector | Format-Table Name, SourceTransportServers -AutoSize
To get information on receive connectors, you need to use the below command.
Get-ReceiveConnector | Format-Table Name, SourceTransportServers -AutoSize
3. Check and Ensure Access Ports are Routed
When you have a local Exchange Server, you need to allow certain ports from the outside to reach the Exchange Server and expose some services on the outside. These include port 25 for email delivery, port 443 to access the Outlook Web Access (OWA), and other ports. If you are removing one of the Exchange Servers, before doing anything, you must check with the Network Administrators and ensure that any access ports or Network Address Translations (NAT) are routed to other Exchange Server. If you have a standalone server and migrated to Microsoft 365, you should review the ports and close them, since these can open vulnerabilities and access to hacker.
4. Uninstall the Exchange Server
At this stage, all the mailboxes have been moved using the New-MoveRequest command to the new Exchange Server or the mailboxes have been migrated to Microsoft 365. However, there are still system mailboxes in the databases, which should be removed before uninstalling the Exchange Server. So, you should check and remove all the mailboxes from the server to be decommissioned.
If you are not certain, when removing the Exchange Server from the Control Panel, the uninstall will inform you that it cannot remove the mailbox role. Once the mailboxes are cleared, you can proceed with the removal of Exchange Server. For this, open the Control Panel, go to Add Remove Programs, and uninstall the Exchange Server.
Apart from uninstalling the Exchange Server, the process will also go through the cleanup process of the Active Directory Schema and removing all references of the server. When this stage is complete, you can safely remove the Active Directory Computer object and dispose of the virtual machine or physical server.
To Conclude
Above, we have discussed the process involved in the decommissioning of an Exchange Server – be it standalone or a part of a DAG. However, before moving to the decommissioning process, you must ensure that all the data has been migrated. If there are mailboxes or other items not migrated or skipped during the migration and you have decommissioned the Exchange Server, then you need to restore the entire server.
However, with specialized third-party Exchange migration tool, such as Stellar Migrator for Exchange, you can easily migrate primary mailboxes, archive mailboxes, and public folders to a new Exchange Server or Microsoft 365. It can also be used for migrating from one Microsoft tenant to another or to local Exchange Server.


