Microsoft Operations Manager

CounterName Property

The CounterNameproperty gets the name of the performance object counter used to report the performance data.

[VBScript] PerfData.CounterName

Access

Read/Write

Return Value

String

Remarks

The CounterNameproperty is read-only when used with performance data provided to the script by MOM. The property is read/write when used with new performance data created with the ScriptContext.CreatePerfDatamethod.

Examples

The following example shows how to access the name of the performance object counter.

[VBScript] 
Function GetPerfCounterString(objPerfData)
	Dim strComputerName, strObjectName, strCounterName,
strInstanceName
	Dim strCounter

	strComputerName = objPerfData.SourceComputer
	strObjectName = objPerfData.ObjectName
	strCounterName = objPerfData.CounterName
	strInstanceName = objPerfData.InstanceName

	strCounter = "\\" & strComputerName & "\" & _ 
				strObjectName & "(" & strInstanceName
& ")\" _
				& strCounterName

	GetPerfCounterString = strCounter
End Function

Requirements

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

See Also

PerfData Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.