Win32_PerfFormattedData_TermService_TerminalServicesSession - WMI sample in VBScript

The foundations for Manageability in Windows 7/2008/Vista/XP/2000 and Millennium Edition/'98 are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The Win32_PerfFormattedData_TermService_TerminalServicesSession WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Win32_PerfFormattedData_TermService_TerminalServicesSession

Description

Example(s)

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_TermService_TerminalServicesSession",,48)
For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object
    Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime
    Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS
    Wscript.Echo "HandleCount: " & objItem.HandleCount
    Wscript.Echo "InputAsyncFrameError: " & objItem.InputAsyncFrameError
    Wscript.Echo "InputAsyncOverflow: " & objItem.InputAsyncOverflow
    Wscript.Echo "InputAsyncOverrun: " & objItem.InputAsyncOverrun
    Wscript.Echo "InputAsyncParityError: " & objItem.InputAsyncParityError
    Wscript.Echo "InputBytes: " & objItem.InputBytes
    Wscript.Echo "InputCompressedBytes: " & objItem.InputCompressedBytes
    Wscript.Echo "InputCompressFlushes: " & objItem.InputCompressFlushes
    Wscript.Echo "InputCompressionRatio: " & objItem.InputCompressionRatio
    Wscript.Echo "InputErrors: " & objItem.InputErrors
    Wscript.Echo "InputFrames: " & objItem.InputFrames
    Wscript.Echo "InputTimeouts: " & objItem.InputTimeouts
    Wscript.Echo "InputTransportErrors: " & objItem.InputTransportErrors
    Wscript.Echo "InputWaitForOutBuf: " & objItem.InputWaitForOutBuf
    Wscript.Echo "InputWdBytes: " & objItem.InputWdBytes
    Wscript.Echo "InputWdFrames: " & objItem.InputWdFrames
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "OutputAsyncFrameError: " & objItem.OutputAsyncFrameError
    Wscript.Echo "OutputAsyncOverflow: " & objItem.OutputAsyncOverflow
    Wscript.Echo "OutputAsyncOverrun: " & objItem.OutputAsyncOverrun
    Wscript.Echo "OutputAsyncParityError: " & objItem.OutputAsyncParityError
    Wscript.Echo "OutputBytes: " & objItem.OutputBytes
    Wscript.Echo "OutputCompressedBytes: " & objItem.OutputCompressedBytes
    Wscript.Echo "OutputCompressFlushes: " & objItem.OutputCompressFlushes
    Wscript.Echo "OutputCompressionRatio: " & objItem.OutputCompressionRatio
    Wscript.Echo "OutputErrors: " & objItem.OutputErrors
    Wscript.Echo "OutputFrames: " & objItem.OutputFrames
    Wscript.Echo "OutputTimeouts: " & objItem.OutputTimeouts
    Wscript.Echo "OutputTransportErrors: " & objItem.OutputTransportErrors
    Wscript.Echo "OutputWaitForOutBuf: " & objItem.OutputWaitForOutBuf
    Wscript.Echo "OutputWdBytes: " & objItem.OutputWdBytes
    Wscript.Echo "OutputWdFrames: " & objItem.OutputWdFrames
    Wscript.Echo "PageFaultsPersec: " & objItem.PageFaultsPersec
    Wscript.Echo "PageFileBytes: " & objItem.PageFileBytes
    Wscript.Echo "PageFileBytesPeak: " & objItem.PageFileBytesPeak
    Wscript.Echo "PercentPrivilegedTime: " & objItem.PercentPrivilegedTime
    Wscript.Echo "PercentProcessorTime: " & objItem.PercentProcessorTime
    Wscript.Echo "PercentUserTime: " & objItem.PercentUserTime
    Wscript.Echo "PoolNonpagedBytes: " & objItem.PoolNonpagedBytes
    Wscript.Echo "PoolPagedBytes: " & objItem.PoolPagedBytes
    Wscript.Echo "PrivateBytes: " & objItem.PrivateBytes
    Wscript.Echo "ProtocolBitmapCacheHitRatio: " & objItem.ProtocolBitmapCacheHitRatio
    Wscript.Echo "ProtocolBitmapCacheHits: " & objItem.ProtocolBitmapCacheHits
    Wscript.Echo "ProtocolBitmapCacheReads: " & objItem.ProtocolBitmapCacheReads
    Wscript.Echo "ProtocolBrushCacheHitRatio: " & objItem.ProtocolBrushCacheHitRatio
    Wscript.Echo "ProtocolBrushCacheHits: " & objItem.ProtocolBrushCacheHits
    Wscript.Echo "ProtocolBrushCacheReads: " & objItem.ProtocolBrushCacheReads
    Wscript.Echo "ProtocolGlyphCacheHitRatio: " & objItem.ProtocolGlyphCacheHitRatio
    Wscript.Echo "ProtocolGlyphCacheHits: " & objItem.ProtocolGlyphCacheHits
    Wscript.Echo "ProtocolGlyphCacheReads: " & objItem.ProtocolGlyphCacheReads
    Wscript.Echo "ProtocolSaveScreenBitmapCacheHitRatio: " & objItem.ProtocolSaveScreenBitmapCacheHitRatio
    Wscript.Echo "ProtocolSaveScreenBitmapCacheHits: " & objItem.ProtocolSaveScreenBitmapCacheHits
    Wscript.Echo "ProtocolSaveScreenBitmapCacheReads: " & objItem.ProtocolSaveScreenBitmapCacheReads
    Wscript.Echo "ThreadCount: " & objItem.ThreadCount
    Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object
    Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime
    Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS
    Wscript.Echo "TotalAsyncFrameError: " & objItem.TotalAsyncFrameError
    Wscript.Echo "TotalAsyncOverflow: " & objItem.TotalAsyncOverflow
    Wscript.Echo "TotalAsyncOverrun: " & objItem.TotalAsyncOverrun
    Wscript.Echo "TotalAsyncParityError: " & objItem.TotalAsyncParityError
    Wscript.Echo "TotalBytes: " & objItem.TotalBytes
    Wscript.Echo "TotalCompressedBytes: " & objItem.TotalCompressedBytes
    Wscript.Echo "TotalCompressFlushes: " & objItem.TotalCompressFlushes
    Wscript.Echo "TotalCompressionRatio: " & objItem.TotalCompressionRatio
    Wscript.Echo "TotalErrors: " & objItem.TotalErrors
    Wscript.Echo "TotalFrames: " & objItem.TotalFrames
    Wscript.Echo "TotalProtocolCacheHitRatio: " & objItem.TotalProtocolCacheHitRatio
    Wscript.Echo "TotalProtocolCacheHits: " & objItem.TotalProtocolCacheHits
    Wscript.Echo "TotalProtocolCacheReads: " & objItem.TotalProtocolCacheReads
    Wscript.Echo "TotalTimeouts: " & objItem.TotalTimeouts
    Wscript.Echo "TotalTransportErrors: " & objItem.TotalTransportErrors
    Wscript.Echo "TotalWaitForOutBuf: " & objItem.TotalWaitForOutBuf
    Wscript.Echo "TotalWdBytes: " & objItem.TotalWdBytes
    Wscript.Echo "TotalWdFrames: " & objItem.TotalWdFrames
    Wscript.Echo "VirtualBytes: " & objItem.VirtualBytes
    Wscript.Echo "VirtualBytesPeak: " & objItem.VirtualBytesPeak
    Wscript.Echo "WorkingSet: " & objItem.WorkingSet
    Wscript.Echo "WorkingSetPeak: " & objItem.WorkingSetPeak
Next