Microsoft Operations Manager

EventParameter Method

The EventParametermethod gets an event parameter.

[VBScript] Event.EventParameter(ID Long)

Parameters

ID
Specifies the event parameter to get.

Return Value

String

Examples

The following example shows how to get the first event parameter for the event provided to the script from MOM.

[VBScript] 
Function MakeAlertFromEvent()
	Dim objAlert
	Dim objEvent

	If (ScriptContext.IsEvent()) Then
		Set objEvent = ScriptContext.Event
		Set objAlert = ScriptContext.CreateAlert()

		objAlert.Computer = objEvent.SourceComputer
		objAlert.ComputerDomain = objEvent.SourceDomain
		objAlert.Description = objEvent.EventParameter(1)
	Else
		Set objAlert = Nothing
	End If

	Set objEvent = Nothing

	Set MakeAlertFromEvent = objAlert
End Function

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

Event Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.