Shortcut Menu

Skip

Main Navigation

Choose your language


ActiveXperts Network Monitor
Monitor servers, workstations, devices and applications in your network

Quicklinks


Retrieve Microsoft Network Cluster Information through VBScript

List Cluster Node Information
List Cluster Resource Group Information
Listing Cluster Resource Information
List Cluster Resource Type Information
List Cluster Service Information
List Network Information
List Network Interface Information
Retrieving Clustering Information


You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.



List Cluster Node Information


Returns information about all the cluster nodes found on a computer.
On Error Resume Next

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

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

For Each objItem in colItems
    Wscript.Echo "Build number: " & objItem.BuildNumber
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Characteristics: " & objItem.Characteristics
    Wscript.Echo "CSD version: " & objItem.CSDVersion
    Wscript.Echo "Dedicated: " & objItem.Dedicated
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Enable event log replication: " & _
        objItem.EnableEventLogReplication
    Wscript.Echo "Flags: " & objItem.Flags
    Wscript.Echo "Identifying descriptions: " & objItem.IdentifyingDescriptions
    Wscript.Echo "Initial load info: " & objItem.InitialLoadInfo
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Last load info: " & objItem.LastLoadInfo
    Wscript.Echo "Major version: " & objItem.MajorVersion
    Wscript.Echo "Minor version: " & objItem.MinorVersion
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Name format: " & objItem.NameFormat
    Wscript.Echo "Node highest version: " & objItem.NodeHighestVersion
    Wscript.Echo "Node lowest version: " & objItem.NodeLowestVersion
    Wscript.Echo "Other identifying info: " & objItem.OtherIdentifyingInfo
    Wscript.Echo "Power state: " & objItem.PowerState
    Wscript.Echo "Primary owner contact: " & objItem.PrimaryOwnerContact
    Wscript.Echo "Primary owner name: " & objItem.PrimaryOwnerName
    Wscript.Echo "Reset capability: " & objItem.ResetCapability
    Wscript.Echo "Roles: " & objItem.Roles
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo
Next
	

List Cluster Resource Group Information


Returns information about all the cluster resource groups on a computer.
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 "Auto-failback type: " & objItem.AutoFailbackType
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Characteristics: " & objItem.Characteristics
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Failback window end: " & objItem.FailbackWindowEnd
    Wscript.Echo "Failback window start: " & objItem.FailbackWindowStart
    Wscript.Echo "Failover period: " & objItem.FailoverPeriod
    Wscript.Echo "Failover threshold: " & objItem.FailoverThreshold
    Wscript.Echo "Flags: " & objItem.Flags
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Load balance state: " & objItem.LoadBalState
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Persistent state: " & objItem.PersistentState
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo
Next
	

Listing Cluster Resource Information


Returns cluster resource information.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\mscluster")

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

For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Characteristics: " & objItem.Characteristics
    Wscript.Echo "Core resource: " & objItem.CoreResource
    Wscript.Echo "Cryptographic checkpoints: " & objItem.CryptoCheckpoints
    Wscript.Echo "Debug prefix: " & objItem.DebugPrefix
    Wscript.Echo "Delete requires all nodes: " & _
        objItem.DeleteRequiresAllNodes
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Flags: " & objItem.Flags
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Is alive poll interval: " & objItem.IsAlivePollInterval
    Wscript.Echo "Load balance analysis interval: " & _
        objItem.LoadBalAnalysisInterval
    Wscript.Echo "Load balance minimum memory units: " & _
        objItem.LoadBalMinMemoryUnits
    Wscript.Echo "Load balance minimum processor units: " & _
        objItem.LoadBalMinProcessorUnits
    Wscript.Echo "Load balance sample interval: " & _
        objItem.LoadBalSampleInterval
    Wscript.Echo "Load balance startup interval: " & _
        objItem.LoadBalStartupInterval
    Wscript.Echo "Local quorum capable: " & objItem.LocalQuorumCapable
    Wscript.Echo "Looks alive poll interval: " & _
        objItem.LooksAlivePollInterval
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Pending timeout: " & objItem.PendingTimeout
    Wscript.Echo "Persistent state: " & objItem.PersistentState
    Wscript.Echo "Private properties: " & objItem.PrivateProperties
    Wscript.Echo "Quorum capable: " & objItem.QuorumCapable
    Wscript.Echo "Registry checkpoints: " & objItem.RegistryCheckpoints
    Wscript.Echo "Resource class: " & objItem.ResourceClass
    Wscript.Echo "Restart action: " & objItem.RestartAction
    Wscript.Echo "Restart period: " & objItem.RestartPeriod
    Wscript.Echo "Restart threshold: " & objItem.RestartThreshold
    Wscript.Echo "Retry period on failure: " & _
        objItem.RetryPeriodOnFailure
    Wscript.Echo "Separate monitor: " & objItem.SeparateMonitor
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo "Subclass: " & objItem.Subclass
    Wscript.Echo "Type: " & objItem.Type
    Wscript.Echo
Next
	

List Cluster Resource Type Information


Returns information about all the cluster resource types on a computer.
On Error Resume Next

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

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

For Each objItem in colItems
    Wscript.Echo "Administrator extensions: " & objItem.AdminExtensions
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Characteristics: " & objItem.Characteristics
    Wscript.Echo "Delete requires all nodes: " & objItem.DeleteRequiresAllNodes
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Display name: " & objItem.DisplayName
    Wscript.Echo "DLL name: " & objItem.DllName
    Wscript.Echo "Flags: " & objItem.Flags
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Is alive poll interval: " & objItem.IsAlivePollInterval
    Wscript.Echo "Local quorum capable: " & objItem.LocalQuorumCapable
    Wscript.Echo "Looks alive poll interval: " & objItem.LooksAlivePollInterval
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Quorum capable: " & objItem.QuorumCapable
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo
Next
	

List Cluster Service Information


Returns information about the cluster service on a computer.
On Error Resume Next

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

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

For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Enable event log replication: " & _
        objItem.EnableEventLogReplication
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Node highest version: " & objItem.NodeHighestVersion
    Wscript.Echo "Node lowest version: " & objItem.NodeLowestVersion
    Wscript.Echo "Started: " & objItem.Started
    Wscript.Echo "Start mode: " & objItem.StartMode
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo "System name: " & objItem.SystemName
    Wscript.Echo
Next
	

List Network Information


Returns network information for a cluster server.
On Error Resume Next

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

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

For Each objItem in colItems
    Wscript.Echo "Address: " & objItem.Address
    Wscript.Echo "Address mask: " & objItem.AddressMask
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Characteristics: " & objItem.Characteristics
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Flags: " & objItem.Flags
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Role: " & objItem.Role
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo
Next
	

List Network Interface Information


Returns information about the network interfaces on a cluster server.
On Error Resume Next 

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

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

For Each objItem in colItems
    Wscript.Echo "Adapter: " & objItem.Adapter
    Wscript.Echo "Address: " & objItem.Address
    Wscript.Echo "Availability: " & objItem.Availability
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Characteristics: " & objItem.Characteristics
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Device ID: " & objItem.DeviceID
    Wscript.Echo "Flags: " & objItem.Flags
    Wscript.Echo "Identifying descriptions: " & objItem.IdentifyingDescriptions
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Network: " & objItem.Network
    Wscript.Echo "Other identifying info: " & objItem.OtherIdentifyingInfo
    Wscript.Echo "Power-on hours: " & objItem.PowerOnHours
    Wscript.Echo "State: " & objItem.State
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo "Status info: " & objItem.StatusInfo
    Wscript.Echo "System name: " & objItem.SystemName
    Wscript.Echo "Total power-on hours: " & objItem.TotalPowerOnHours
    Wscript.Echo
Next
	

Retrieving Clustering Information


Returns basic information about a cluster.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\mscluster")

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

For Each objItem in colItems
    Wscript.Echo "Administrator extensions: " & objItem.AdminExtensions
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Dedicated: " & objItem.Dedicated
    Wscript.Echo "Default network role: " & objItem.DefaultNetworkRole
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Enable event log replication: " & _
        objItem.EnableEventLogReplication
    Wscript.Echo "Group administrator extensions: " & _
        objItem.GroupAdminExtensions
    Wscript.Echo "Identifying descriptions: " & objItem.IdentifyingDescriptions
    Wscript.Echo "Installation date: " & objItem.InstallDate
    Wscript.Echo "Maintenance file: " & objItem.MaintenanceFile
    Wscript.Echo "Maximum number of nodes: " & objItem.MaxNumberOfNodes
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Name format: " & objItem.NameFormat
    Wscript.Echo "Network administrator extensions: " & _
        objItem.NetworkAdminExtensions
    Wscript.Echo "Network interface administrator extensions: " & _
        objItem.NetworkInterfaceAdminExtensions
    Wscript.Echo "Network priorities: " & objItem.NetworkPriorities
    Wscript.Echo "Node administrator xtensions: " & objItem.NodeAdminExtensions
    Wscript.Echo "Other identifying info: " & objItem.OtherIdentifyingInfo
    Wscript.Echo "Primary owner contact: " & objItem.PrimaryOwnerContact
    Wscript.Echo "Primary owner name: " & objItem.PrimaryOwnerName
    Wscript.Echo "Quorum log file size: " & objItem.QuorumLogFileSize
    Wscript.Echo "Resource administrator extensions: " & _
        objItem.ResourceAdminExtensions
    Wscript.Echo "Resource type administrator extensions: " & _
        objItem.ResourceTypeAdminExtensions
    Wscript.Echo "Roles: " & objItem.Roles
    Wscript.Echo "Security: " & objItem.Security
    Wscript.Echo "Security descriptor: " & objItem.Security_Descriptor
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo
Next