How to Remove Exchange 2016 Server from DAG: A Step-by-Step Guide

How to Remove Exchange 2016 Server from DAG: A Step-by-Step Guide

Maintaining a healthy Microsoft Exchange Server environment often requires administrators to perform complex maintenance tasks. One such critical task is the need to remove Exchange 2016 server from DAG (Database Availability Group) configurations. This procedure is common during hardware refreshes, server decommissioning, or when troubleshooting node-specific issues.

However, removing a server from a DAG is not as simple as just shutting it down. It is a delicate process that involves updating the underlying Windows Failover Cluster, redistributing databases, and ensuring the Exchange organisation’s metadata is cleaned up correctly. A misstep here can lead to replication failures, quorum issues, or even database dismounts.

In this comprehensive guide, we will walk you through the prerequisites, the detailed removal steps, and the necessary post-removal clean-up to safely remove Exchange 2016 server from DAG without impacting your end users.

Why Would You Need to Remove a Server from a DAG?

Before diving into the “how,” it’s essential to understand the “why.” There are several scenarios where an administrator might need to perform this action:

  • Server Decommissioning: Retiring old hardware after migrating mailboxes to new Exchange 2016 or 2019 servers .

  • Planned Maintenance: Performing significant hardware or software upgrades that require the server to be removed from the high-availability pool temporarily.

  • Node Failure: In cases where a server is corrupted or the cluster services fail, you may need to forcefully evict the server to restore quorum to the remaining nodes .

  • DAG Reconfiguration: Changing the replication model, datacenter topology, or reducing the number of copies for cost optimisation.

Prerequisites: The “Golden Rules” Before You Start

If you execute the removal process without the proper prep work, you risk breaking the Database Availability Group. Before you attempt to remove Exchange 2016 server from DAG, you must complete the following checklist:

  1. Check Replication Health: Ensure that all databases on the remaining DAG members are healthy.

    powershell
    Get-MailboxDatabaseCopyStatus

    Verify that all copies have a status of Healthy or Mounted.

  2. Verify Cluster Status: Confirm the Windows Failover Cluster is functioning correctly.

    powershell
    Get-ClusterNode

    All nodes that are supposed to be online should show a status of Up.

  3. Move Active Mailbox Databases: You cannot remove a server that hosts active database copies. You must move the active copies to another server in the DAG .

    powershell
    Move-ActiveMailboxDatabase -Server ServerToRemove -ActivateOnServer TargetServer
  4. Remove Database Copies: The target server must be empty. You must remove all replicated database copies from the server you intend to remove .

    powershell
    Get-MailboxDatabaseCopyStatus -Server ServerToRemove | Remove-MailboxDatabaseCopy

Step-by-Step: How to Remove Exchange 2016 Server from DAG

Once your prerequisites are met, you can proceed with the actual removal. There are two primary methods to remove Exchange 2016 server from DAG: using the Exchange Admin Center (EAC) or using PowerShell. The PowerShell method is generally preferred for its speed and detailed output.

Method 1: Using PowerShell (Recommended)

This is the most efficient method. Run the Exchange Management Shell as an administrator.

Step 1: Remove the Server from the DAG
Use the Remove-DatabaseAvailabilityGroupServer cmdlet. This command removes the server from both the DAG and the underlying cluster .

powershell
Remove-DatabaseAvailabilityGroupServer -Identity "DAGName" -MailboxServer "ServerToRemove"

If the server is offline and cannot be contacted, you must use the -ConfigurationOnly switch to remove its metadata from Active Directory .

powershell
Remove-DatabaseAvailabilityGroupServer -Identity "DAG01" -MailboxServer "EX2016-03" -ConfigurationOnly

Important: If you use -ConfigurationOnly, you will need to manually evict the node from the Windows Failover Cluster using Failover Cluster Manager.

Step 2: Evict the Node from the Cluster (If necessary)
If the server is online, the PowerShell command should automatically evict it. If you used the -ConfigurationOnly flag, or if the node remains in the cluster:

  1. Open Failover Cluster Manager.

  2. Connect to the cluster (usually the same name as your DAG).

  3. Right-click the node and select Evict or Remove.

Method 2: Using the Exchange Admin Center (EAC)

For those who prefer a graphical interface:

  1. Navigate to Servers > Database Availability Groups.

  2. Select the DAG and click the Edit icon (pencil).

  3. In the DAG properties, find the list of member servers.

  4. Select the server you wish to remove Exchange from, and click the Minus (-) button to remove it.

  5. Save the changes.

Post-Removal: Cleaning Up and Verifying Success

After you remove Exchange 2016 server from DAG, your job isn’t over. You must ensure the server is fully decommissioned from the Exchange organisation.

1. Update DNS and Load Balancers

Before uninstalling Exchange, ensure that no clients or mail flow are pointing to this server.

  • DNS: Remove or update the A-records for the decommissioned server.

  • Load Balancers: Remove the server from any load balancing pools for SMTP, OWA, or MAPI to prevent service disruption .

2. Uninstall Exchange from the Server

The server is no longer part of the DAG, but it still exists as a server object in the Exchange organization.

  • Go to Control Panel > Programs and Features.

  • Find Microsoft Exchange Server 2016 and click Uninstall.

  • Alternatively, use the setup wizard from an elevated command prompt:

    cmd
    Setup.com /mode:Uninstall /IAcceptExchangeServerLicenseTerms

3. Clean Up the DAG Object (Optional)

If you removed the last server from a DAG, or if you are decommissioning the entire DAG, you should remove the empty DAG object itself .

powershell
Remove-DatabaseAvailabilityGroup -Identity "DAGName"

As noted in the official documentation, the DAG must be empty for this command to work . You cannot remove a DAG that still has member servers.

Troubleshooting Common Issues

Even with perfect planning, you might encounter errors when trying to remove Exchange 2016 server from DAG.

  • Error: “Cannot remove the specified server because the server hosts databases”:
    Cause: You didn’t remove all database copies .*
    Solution: Re-run the Get-MailboxDatabaseCopyStatus command. You likely missed a copy or a mailbox database was not moved correctly.

  • Error: “An Active Manager operation failed” or Quorum Issues:
    Cause: The underlying cluster is unstable, or you removed a node that was critical for quorum.*
    Solution: If you have an even number of nodes remaining, ensure the File Share Witness (FSW) is online and accessible. You may need to reconfigure the cluster quorum settings .

  • Error: “The operation couldn’t be performed because object ‘ServerName’ couldn’t be found”:
    Cause: This often occurs when using -ConfigurationOnly on a server that is already partially orphaned.*
    Solution: Manually clean up the server object from Active Directory using ADSIEdit, or perform an Exchange Server recovery install (Setup /m:RecoverServer) to bring the server back into a state where it can be cleanly removed .

Conclusion

Knowing how to safely remove Exchange 2016 server from DAG is a vital skill for any Exchange administrator. Whether you are decommissioning legacy hardware, responding to a node failure, or consolidating your server footprint, following the structured approach outlined above ensures the stability of your messaging environment.

By adhering to the prerequisites—moving databases, removing copies, and checking cluster health—and using the precise PowerShell commands provided, you can execute this task with confidence. Always remember that the goal is not just to remove the server, but to do so while maintaining high availability for the rest of your organization.


Related Business Insights

Looking for more technology strategies to streamline your business operations? Check out these resources from BusinessToMark:

More From Author