Event.EventType Property
Gets the type of the event, such as Warning or Error.
Event.EventType
Access
Read/Write
Return Value
Long
Remarks
The EventType property is read-only when used with an event provided to the script by MOM. The property is read/write when used with a new event created with the ScriptContext.CreateEvent method.
The following table shows the values for the EventType property.
Value | Description |
---|---|
0 | Success |
1 | Error |
2 | Warning |
4 | Information |
8 | Audit Success |
16 | Audit Failure |
Examples
The following example shows how to create a new event and set the EventType property to Warning.
Const EVENT_TYPE_SUCCESS = 0
Const EVENT_TYPE_ERROR = 1
Const EVENT_TYPE_WARNING = 2
Const EVENT_TYPE_INFORMATION = 4
Const EVENT_TYPE_AUDITSUCCESS = 8
Const EVENT_TYPE_AUDITFAILURE = 16
Function MakeEvent()
Dim objEvent
Set objEvent = ScriptContext.CreateEvent()
objEvent.EventSource = "TestScript"
objEvent.EventNumber = 1349
objEvent.EventType = EVENT_TYPE_WARNING
objEvent.LoggingDomain = "DOMAIN1"
objEvent.SourceDomain = "DOMAIN1"
Set MakeEvent = objEvent
End Function
Requirements
Platforms: Requires Windows 2000 or later
Version: Requires MOM 2000 or later