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:
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?
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?