An attempt to switch the Windows Server Failover Clustering (WSFC) cluster context of Always On Availability Groups to a ...

An attempt to switch the Windows Server Failover Clustering (WSFC) cluster context of Always On Availability Groups to a remote WSFC cluster failed. This is because one or more availability replicas hosted by the local instance of SQL Server are currently joined to an availability group on the local WSFC cluster. Remove each of the joined replicas from its respective availability group. Then retry your ALTER SERVER CONFIGURATION SET HADR CLUSTER CONTEXT = '%1!s!' command.