Sometimes you want to remove or join a cluster node and it fails to join.
Cluster node cannot join , already member etc.
the solution is easy clear the Cluster info on this node and you are ready to go.
powershell as an administrator
Import-Module FailoverClusters
clear-clusternode
After this join the node.
If you want to create this on an exchange cluster and rebuild it.
The following steps can be helpful get the DAG info and mailbox servers and remove them.
In powershell
Get-DatabaseAvailabilityGroup -Identity DAG1 | Format-List Servers
Remove-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX1 -ConfigurationOnly:$True -Confirm:$False
Remove-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX2 -ConfigurationOnly:$True -Confirm:$False
Get-DatabaseAvailabilityGroup -Identity DAG1 | Format-List Servers
Import-Module FailoverClusters
clear-clusternode
For creation a new DAG :
Powershell
Add-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX1
Add-DatabaseAvailabilityGroupServer -Identity DAG1 -MailboxServer MBX2
Get-DatabaseAvailabilityGroup -Identity DAG1 | Format-List Servers
Add-MailboxDatabaseCopy -Identity DAG1-DB1 -MailboxServer MBX2
Get-MailboxDatabaseCopyStatus -Server MBX2