Can C # get information about the cluster?
For example to get a list of roles and their resources?
If you can - skip the link to read how to do it.
I tried it this way, but I get System.Managment.ManagmentException: Invalid class
string clusterName = "app-server.local"; string custerGroupResource = "cluster.server.local"; ConnectionOptions options = new ConnectionOptions { Authentication = AuthenticationLevel.PacketPrivacy }; ManagementScope s = new ManagementScope("\\\\" + clusterName, options); ManagementPath p = new ManagementPath("Mscluster_Clustergroup.Name='" + custerGroupResource + "'"); using (ManagementObject clrg = new ManagementObject(s, p, null)) { clrg.Get(); Console.WriteLine(clrg["Status"]); }