The MOMScriptAPI object is the top-level object for the scripting API.

Methods

Name Description

MOMScriptAPI.CreateDiscoveryData

Creates a new discovery data object, which stores discovery data and is used to submit the collected data back to the Management Server.

MOMScriptAPI.CreatePropertyBag

Creates a new property bag object, which is used to temporarily store discovery data as a collection of name-value pairs.

MOMScriptAPI.LogScriptEvent

Writes a message to the Operations Manager event log.

MOMScriptAPI.Return

Submits the discovery and monitoring data back to the Management Server and ends the execution of the script.

Properties

None.

Examples

The following example shows how to create a new instance of the MOMScriptAPI object.

Visual Basic Script  Copy Code
Dim objScriptAPI
Set objScriptAPI = CreateObject("MOM.ScriptAPI")
JScript  Copy Code
var objScriptAPI;
objScriptAPI = new ActiveXObject('MOM.ScriptAPI');

Requirements

Platforms: Requires Windows Server 2003, Windows Vista, or Windows Server 2008

Version: Requires Operations Manager 2007

Remarks

The MOMScriptAPI methods are used to create new discovery data objects and then submit them back to the Operations Manager Management Server.

You can also use the MOMScriptAPI object to submit monitoring data back to the Operations Manager Management Server.

See Also


Send comments about this topic to Microsoft.
[an error occurred while processing this directive]