ScriptContext.CreatePerfData Method
Generates a new PerfData object.
ScriptContext.CreatePerfData()
Parameters
None
Return Value
Object (PerfData)
Remarks
The PerfData object returned by this method is initially empty. After creating the new PerfData object, assign a value to it using the ScriptContext.PerfData property. The PerfData object can then be sent to the MOM data stream using the ScriptContext.Submit method.
Examples
The following example creates a PerfData object with the CreatePerfData method, populates the PerfData object the using PerfData object properties, and submits the PerfData object to the MOM data stream with the Submit method.
Function MakeAndSubmitPerfData(strSourceComputer, lngValue)
Dim objPerfData
Set objPerfData = ScriptContext.CreatePerfData()
'Populate perfdata
objPerfData.SourceComputer = strSourceComputer
objPerfData.Value = lngValue
ScriptContext.Submit(objPerfData)
Set MakeAndSubmitPerfData = objPerfData
End Function
Requirements
Platforms: Requires Windows 2000 or later
Version: Requires MOM 2000 or later
See Also
ScriptContext Object | ScriptContext.PerfData Property | ScriptContext.Submit Method | PerfData Object