During an Exchange uninstallation, I faced an issue with the DAG nodes. Even though I had successfully removed them from the DAG and they had no databases I was unable to proceed with the decommissioning. I got the below error during verification:
“This computer is a member of a database availability group (DAG). It must be removed from DAG before you can uninstall Exchange”
I opened PowerShell and did a query on the servers which I had previously removed from the DAG.
Cluster node
Upon execution, it showed me that the cluster configuration was lingering on these nodes.So I forcefully evicted them using the below command.
Clear-ClusterNode <Node name>
Once executed I cleared the prerequisite check and uninstalled the nodes successfully.