I wish to enumerate all the instances within a SQL Server Always On Availability Group.
There is a Dynamic Management View within SQL Sever which provides this, but you need to be connected to a relevant instance to query this view.
Also, I can see in the registry for a node on the cluster that there is the mapping that I wish to get: HKLM\Cluster\Resources\{cluster_guid}\SqlInstToNodeMap
There is a WMI class that can enumerate all Availability Groups on the cluster, but I cannot see how (even by examining the PrivateProperties object) I can enumerate the SQL Instance to Cluster Node map through WMI - does anyone know if this is possible, or can provide a mechanism that doesn't require looking at the registry or querying SQL Server?
Thanks