ComputerDomain Property

Provides access to the name of the domain to which the computer that raised the alert belongs.

Syntax

ScriptContext.Alert.ComputerDomain
ScriptContext.CreateAlert.ComputerDomain

Access

Read Only When used with an alert provided to the script by the Microsoft Operations Manager 2000 (MOM) product.
Read/Write When used with a new alert created with the ScriptContext.CreateAlert Method.

Return Type

String.

Example

To create a new alert and set the ComputerDomain property, enter:

Dim MYalert
Dim MYevent
set MYalert = ScriptContext.CreateAlert
set MYevent = ScriptContext.Event
set MYalert.ComputerDomain = MYevent.SourceDomain

This example sets the ComputerDomain property based on the event that caused the MOM product to invoke the script. The ComputerDomain property is set to the name of the domain to which the computer that logged the event belongs.