Event.Message Property
Gets the description of the event.
Event.Message
Access
Read/Write
Return Value
String
Remarks
The Message 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.
Examples
The following example sets the Message property based on the event that caused MOM to invoke the script. The Message property is set to the description of the event.
Function MakeEventFromEvent()
Dim objSourceEvent
Dim objNewEvent
If (ScriptContext.IsEvent()) Then
Set objSourceEvent = ScriptContext.Event
Set objNewEvent = ScriptContext.CreateEvent()
objNewEvent.LoggingDomain = "DOMAIN1"
objNewEvent.UTCTime = objSourceEvent.UTCTime
objNewEvent.UserName = objSourceEvent.UserName
objNewEvent.SourceComputer = objSourceEvent.SourceComputer
objNewEvent.Message = objSourceEvent.Message
objNewEvent.LoggingComputer = objSourceEvent.LoggingComputer
Else
Set objNewEvent = Nothing
End If
Set objSourceEvent = Nothing
Set MakeEventFromEvent = objNewEvent
End Function
Requirements
Platforms: Requires Windows 2000 or later
Version: Requires MOM 2000 or later