Last active
December 14, 2015 06:19
-
-
Save gravejester/5041834 to your computer and use it in GitHub Desktop.
Microsoft Cluster – Get group ownership information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment