|Microsoft Operations Manager|
The ComputerDomainproperty gets the name of the domain to which the computer that raised the alert belongs.
The ComputerDomainproperty is read/write when used with a new alert created with the ScriptContext.CreateAlertmethod. This property is read-only when used with an Alertobject provided to the script by MOM.
The following example sets the ComputerDomainproperty based on the event that caused MOM to invoke the script. The ComputerDomainproperty is set to the name of the domain to which the computer that logged the event belongs.
[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
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 firstname.lastname@example.org.