Microsoft Operations Manager |
The SourceComputerproperty gets the name of the computer from which the performance data was collected.
[VBScript] PerfData.SourceComputer
Read/Write
String
The SourceComputerproperty 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.
The following example shows how to create new performance data and set the SourceComputerproperty.
[VBScript]
Function MakePerfDataFromEvent()
Dim objPerfData, objEvent
Set objPerfData = ScriptContext.CreatePerfData()
If (ScriptContext.IsEvent()) Then
Set objEvent = ScriptContext.Event
objPerfData.SourceDomain = objEvent.SourceDomain
objPerfData.SourceComputer = objEvent.SourceComputer
objPerfData.SampleUTCTime = objEvent.UTCTime
Else
Set objPerfData = Nothing
End If
Set objEvent = Nothing
Set MakePerfDataFromEvent = objPerfData
End Function
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.