Microsoft Operations Manager |
The Messageproperty gets the description of the event.
[VBScript] Event.Message
Read/Write
String
The Messageproperty 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.CreateEventmethod.
The following example sets the Messageproperty based on the event that caused MOM to invoke the script. The Messageproperty is set to the description of the event.
[VBScript]
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.MessageDLL = objSourceEvent.MessageDLL
objNewEvent.LoggingComputer =
objSourceEvent.LoggingComputer
Else
Set objNewEvent = Nothing
End If
Set objSourceEvent = Nothing
Set MakeEventFromEvent = objNewEvent
End Function
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.