The
MSCluster_EventResourceStateChange
class is a WMI class that represents a resource state
change event.
The following syntax is simplified from MOF code, and includes all inherited properties.
Syntax
[Dynamic, Provider ("MS_CLUSTER_PROVIDER"), UUID ("{F1163D38-0E12-49ed-B0AF-09C683F89243}")]class MSCluster_EventResourceStateChange : MSCluster_EventStateChange
{
uint64 TIME_CREATED;
uint8 SECURITY_DESCRIPTOR[];
uint32 EventTypeMajor;
uint32 EventTypeMinor;
string EventObjectName;
uint32 EventObjectType;
string EventObjectPath;
uint32 EventNewState;
string EventNode;
string EventGroup;
};
Methods
The MSCluster_EventResourceStateChange class does not define any methods.
Properties
The MSCluster_EventResourceStateChange class defines the following properties.
- EventGroup
-
- Data type: string
- Access type: Read-only
Current group that contains this resource.
- EventNewState
-
- Data type: uint32
- Access type: Read-only
Current state of the object that is reporting a state change.
Inherited from
MSCluster_EventStateChange.
- EventNode
-
- Data type: string
- Access type: Read-only
Current node that is hosting this group.
- EventObjectName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Read
Provides the name of the object to which this event applies.
Inherited from MSCluster_EventStateChange.
- EventObjectPath
-
- Data type: string
- Access type: Read-only
- Qualifiers: Read
Provides the WMI path of the object to which this event applies.
Inherited from MSCluster_EventStateChange.
- EventObjectType
-
- Data type: uint32
- Access type: Read-only
| Value | Meaning |
- 0
| Handle
|
- 1
| Cluster
|
- 2
| Node
|
- 3
| Group
|
- 4
| Resources
|
- 5
| Resource type
|
- 6
| Network
|
- 7
| Network interface
|
- 8
| Registry
|
- 9
| Quorum
|
Provides the type of object to which this event applies.
Inherited from MSCluster_EventStateChange.
- EventTypeMajor
-
- Data type: uint32
- Access type: Read-only
- Qualifiers: Read
Provides the major event category. A value of 0 indicates an event returned by
GetClusterNotify.
Inherited from MSCluster_EventStateChange.
- EventTypeMinor
-
- Data type: uint32
- Access type: Read-only
Provides the subtype within the major category. When the EventTypeMajor
property is 0, this subtype contains the cluster event value that
GetClusterNotify returns.
Inherited from MSCluster_EventStateChange.
- SECURITY_DESCRIPTOR
-
- Data type: uint8 array
- Access type: Read-only
- Qualifiers: Read
Provides the security descriptor used by the event provider to determine which users can receive the
event.
For more information about constants used to set this security descriptor, see
WMI Security Constants.
Inherited from MSCluster_EventStateChange.
- TIME_CREATED
-
- Data type: uint64
- Access type: Read-only
- Qualifiers: Read
Provides the unique value that indicates the time at which the event was generated. This is a 64-bit value
that represents the number of 100-nanosecond intervals after January 1, 1601. The information is in the
Coordinated Universal Times (UTC) format.
For more information about using uint64 values in scripts, see
Scripting in WMI.
Inherited from MSCluster_EventStateChange.
Remarks
The
MSCluster_EventResourceStateChange
class is derived from the
MSCluster_EventStateChange class.
Examples
The following WMI script shows you how to trap failover cluster events.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Failover Cluster Documentation:
'' Example code for the MSCluster_EventResorceStateChange class topic.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Dim objClusterEvent
Dim objClusterEvents
Dim objClusterService
Dim objSWbemLocator
Dim strQuery
' Query for all resource state change events
' (CLUSTER_CHANGE_RESOURCE_STATE = 0x00000100 = 256)
strQuery = "select * from MSCluster_Event where EventTypeMinor = 256"
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objClusterService = objSWbemLocator.ConnectServer("", "Root\MSCluster")
Set objClusterEvents = objClusterService.ExecNotificationQuery(strQuery)
Do
Set objClusterEvent = objClusterEvents.NextEvent(300000)
If Err = 0 Then
WScript.Echo " Object Name : " & objClusterEvent.EventObjectName
WScript.Echo " EventTypeMinor : 0x" & hex(objClusterEvent.EventTypeMinor)
WScript.Echo " EventObjectType : " & objClusterEvent.EventObjectType
End If
Loop
Requirements
| Minimum supported client | None supported |
| Minimum supported server | Windows Server 2003 Datacenter, Windows Server 2003 Enterprise |
| MOF | ClusWmi.mof |
| Namespace | \\.\Root\MSCluster |
Send comments about this topic to Microsoft
Build date: 11/19/2009