Microsoft Operations Manager

CreatePerfData Method

The CreatePerfDatamethod generates a new PerfDataobject.

[VBScript] ScriptContext.CreatePerfData()



Return Value

Object (PerfData)


The PerfDataobject returned by this method is initially empty. After creating the new PerfDataobject, assign a value to it using the ScriptContext.PerfDataproperty. The PerfDataobject can then be sent to the MOM data stream using the ScriptContext.Submitmethod.


The following example creates a PerfDataobject with the CreatePerfDatamethod, populates the PerfDataobject the using PerfDataobject properties, and submits the PerfDataobject to the MOM data stream with the Submitmethod.

Function MakeAndSubmitPerfData(strSourceComputer, lngValue)
	Dim objPerfData

	Set objPerfData = ScriptContext.CreatePerfData() 

	'Populate perfdata
	objPerfData.SourceComputer = strSourceComputer
	objPerfData.Value = lngValue


	Set MakeAndSubmitPerfData = objPerfData
End Function


Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

ScriptContext Object, ScriptContext.PerfData Property, ScriptContext.Submit Method, PerfData Object

Did you find this information useful? Please send your suggestions and comments about the documentation to