PerfData.CounterName Property

Gets or sets the name of the performance object counter used to report the performance data.

 PerfData.CounterName

Access

Read/Write

Return Value

String

Remarks

The CounterName property 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.CreatePerfData method.

Examples

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

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

Platforms: Requires Windows 2000 or later

Version: Requires MOM 2000  or later

See Also

PerfData Object