Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Cluster Resource "Cluster Disk" fetching the data

Listing status for resource 'SQL Server (CLUSTER)':

Resource Group Node Status

Cluster Disk Cluster Disk Node1 Online

How can i parse the Node name here or is there some other command which would help me fetch it?

share|improve this question
up vote 0 down vote accepted

Windows Server 2008 R2 and higher include a Powershell module for failover clusters, however they are not backward compatible with Windows Server 2008 or 2003. I prefer to use WMI which supports all OS versions and does not require parsing. Here's how to list resources and active node using WMI:

 $cluster = "myCluster"
 gwmi -ComputerName $cluster -Authentication PacketPrivacy -Namespace "root\mscluster" -Class MSCluster_Resource |
  add-member -pass NoteProperty Cluster $cluster | 
    add-member -pass ScriptProperty Node {
     gwmi -namespace "root\mscluster" -computerName $this.Cluster -Authentication PacketPrivacy -query "ASSOCIATORS OF {MSCluster_Resource.Name='$($this.Name)'} WHERE AssocClass = MSCluster_NodeToActiveResource" |
      Select -ExpandProperty Name } | select name, node
share|improve this answer
Thanks, this helped! – Nida Sahar Nov 4 '12 at 17:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.