Ok, there are probably several different ways you can get information about cluster group ownership, and I’ll try to post a “proper” script for doing this some other time. For now I just wanted to share with you the mother of all one-liners:
Get-WmiObject -namespace rootmscluster -class mscluster_resourcegroup -computer $computer -Authentication PacketPrivacy|Add-Member -pass ScriptProperty Node {Get-WmiObject -namespace rootmscluster -computer $computer -Authentication PacketPrivacy -query "ASSOCIATORS OF {MSCluster_ResourceGroup.Name='$($this.name)'} WHERE AssocClass = MSCluster_NodeToActiveGroup"|Select -ExpandProperty Name}|Select @{Name="Group";Expression={$_.Name}},Node,@{Name="Status";Expression={if($_.State -eq 0){"Online"}else{"Offline"}}}|ft -autosize
The only thing you have to do first is to populate $computer with the name of a cluster node.