Microsoft Operations Manager

Alert Property

The Alertproperty gets the Alertobject that caused MOM to invoke the script.

[VBScript] ScriptContext.Alert

Access

Read/Write

Return Value

Object

Examples

The following example shows how to access the Alertobject that caused MOM to invoke the script.

[VBScript] 
Function CreateNewAlert()
	Dim objCreatedAlert
	Dim objAlert

	Set objCreatedAlert = ScriptContext.CreateAlert()

	If (ScriptContext.IsAlert()) Then
		Set objAlert = ScriptContext.Alert

		objCreatedAlert.Name = objAlert.Name
		objCreatedAlert.AlertLevel = 50
		objCreatedAlert.Owner = "[unassigned]"
		objCreatedAlert.ResolutionState = 0  ' New
	Else
		Set objCreatedAlert = Nothing
	End If

	Set objAlert = Nothing

	Set CreateNewAlert = objCreatedAlert
End Function

Requirements

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

See Also

ScriptContext Object, Alert Object


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