CreateAlert Method

Generates a new Alert object. Populate the Alert object with the ScriptContext.Alert object properties and methods. Then submit the Alert object to the Microsoft Operations Manager 2000 (MOM) data stream with the ScriptContext.Submit method.

Syntax

ScriptContext.CreateAlert

Parameters

None.

Return Type

Alert.

Example

To generate a new alert object, enter:

Dim MYalert
Set MYalert = ScriptContext.CreateAlert

//Populate the alert
MYalert.description = "This is a test alert description."

ScriptContext.Submit(MYalert)

This example creates an Alert object with the CreateAlert method, populates the Alert object using the Alert object properties, and submits the Alert object to the MOM data stream with the Submit method.