Share via


MOMClassInstance Object

Applies To: Operations Manager 2007 R2, Operations Manager 2007 SP1, System Center Operations Manager 2007

Represents a monitoring object, which is an instance of a monitoring class.

Methods

Name Description

MOMClassInstance.AddProperty

Adds a named value to the monitoring object.

Properties

None.

Requirements

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

Version: Requires Operations Manager 2007

Remarks

The MOMClassInstance object is created by the MOMDiscoveryData.CreateClassInstance method. After it has been created, properties must be set on the object by calling MomClassInstance.AddProperty for each property.

After the MOMClassInstance has been created and the properties have been added, it then must be added to the MOMDiscoveryData object by calling the MOMDiscoveryData.AddInstance method. Finally, the MOMDiscoveryData object can be passed by calling either the MOMScriptAPI.Return Method or the MOMScriptAPI.ReturnItems Method method.

note
Failure to add properties on the MOMClassInstanceobject will cause a failure to be logged in the event log when the data is returned to the management server. For an example of adding properties to the MOMClassInstance, see the MOMDiscoveryData.CreateClassInstance method.

See Also

Reference

MOMDiscoveryData.AddInstance Method

Other Resources

Operations Manager 2007 R2 Scripting Objects