Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WMI query of cluster

Status
Not open for further replies.

Dbyte

Technical User
Mar 6, 2002
87
I am trying to run a script on a MS cluster to get certain info. Here is my code so far:
Code:
On Error Resume Next

strComputer = "*****"
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\mscluster")

Set colItems = objWMIService.ExecQuery("Select * from MSCluster_ResourceGroup")

For Each objItem in colItems
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Owner: " & objItem.Owner
Next

2 questions:
1. Does a response of "0" to the objItem.State line mean the group is active?
2. The objItem.Owner line generates no response. A column by this name does exist when I view the groups in Cluster Administrator. How do I fix this line to return a group's owner?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top