powershellfailovercluster

Failover cluster manager active node in powershell


I am trying to extract the cluster active node using powershell for data collection purpose. Firstly, does cluster active node and current host server refer to the same thing.

get-clustergroup -Name 'Cluster Group'|select *

I am using the above script to extract the owner node. Let me know if this correct way to proceed or is there any other script to follow up to get the active node in the cluster.


Solution

  • The following command will give you the active node for the cluster group directly:

    (get-clustergroup -Name 'Cluster Group').ownernode.name