Get-WmiObject -Class MSCluster_NodeToActiveResource -Namespace rootmscluster | format-table GroupComponent,PartComponent -AutoSize
This returns the GroupComponent and PartComponent data for a given server. You can point this to other clustered machines by simply using the -ComputerName parameter. With WMI there are all sorts of other complications that can come into the picture. This command works great for a local machine on which you are doing research.The same information can be obtained from WMIC with the following commands on
cmd.exe
:C:Userswill>wmic
wmic:rootcli>/namespace:rootmscluster
wmic:rootcli>context
NAMESPACE : rootmscluster
ROLE : rootcli
NODE(S) : server
IMPLEVEL : IMPERSONATE
[AUTHORITY : N/A]
AUTHLEVEL : PKTPRIVACY
LOCALE : ms_409
PRIVILEGES : ENABLE
TRACE : OFF
RECORD : N/A
INTERACTIVE : ON
FAILFAST : OFF
OUTPUT : STDOUT
APPEND : STDOUT
USER : N/A
AGGREGATE : ON
wmic:rootcli>path __namespace
Name
ms_409
wmic:rootcli>path MSCluster_NodeToActiveResource
This last command will output the same exact results you see when you run the Get-WmiObject cmdlet listed above. Now, you have to understand how to use the data to be useful, but, it is good to have jotted down for reference. There are five steps outlined above, but, only three are truly necessary. Below are the steps to explain why I use these commands in this specific order:- Launch wmic.exe.
- Switch to the rootmscluster namespace. This is where cluster data resides.
- (Not required) Verify you are in the rootmscluster namespace
- (Not required) Check the namespace.
- Enumerate the objects data with the path parameter.
For good measure, here is a link to actually be productive with the data:
Finding Which Cluster Node a Resource is Currently Via Powershell & WMI
0 comments:
Post a Comment