Win32_PerfRawData_UGTHRSVC powershell sample code
The foundations for Manageability in Windows is 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. The Win32_PerfRawData_UGTHRSVC WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
$strComputer = "."
$objWMi = get-wmiobject -computername localhost -Namespace root\CIMV2 -Query "Select * from Win32_PerfRawData_UGTHRSVC_SearchGatherer"
foreach ($obj in $objWmi)
{
write-host "ActiveQueueLength:" $obj.ActiveQueueLength
write-host "AdminClients:" $obj.AdminClients
write-host "AllNotificationsReceived:" $obj.AllNotificationsReceived
write-host "Caption:" $obj.Caption
write-host "DelayedDocuments:" $obj.DelayedDocuments
write-host "Description:" $obj.Description
write-host "DocumentEntries:" $obj.DocumentEntries
write-host "DocumentsDelayedRetry:" $obj.DocumentsDelayedRetry
write-host "DocumentsFiltered:" $obj.DocumentsFiltered
write-host "DocumentsFilteredRate:" $obj.DocumentsFilteredRate
write-host "DocumentsSuccessfullyFiltered:" $obj.DocumentsSuccessfullyFiltered
write-host "DocumentsSuccessfullyFilteredRate:" $obj.DocumentsSuccessfullyFilteredRate
write-host "ExtNotificationsRate:" $obj.ExtNotificationsRate
write-host "ExtNotificationsReceived:" $obj.ExtNotificationsReceived
write-host "FilteringThreads:" $obj.FilteringThreads
write-host "FilterObjects:" $obj.FilterObjects
write-host "FilterProcessCreated:" $obj.FilterProcessCreated
write-host "FilterProcesses:" $obj.FilterProcesses
write-host "FilterProcessesMax:" $obj.FilterProcessesMax
write-host "Frequency_Object:" $obj.Frequency_Object
write-host "Frequency_PerfTime:" $obj.Frequency_PerfTime
write-host "Frequency_Sys100NS:" $obj.Frequency_Sys100NS
write-host "Heartbeats:" $obj.Heartbeats
write-host "HeartbeatsRate:" $obj.HeartbeatsRate
write-host "IdleThreads:" $obj.IdleThreads
write-host "Name:" $obj.Name
write-host "NotificationSources:" $obj.NotificationSources
write-host "NotificationsRate:" $obj.NotificationsRate
write-host "PerformanceLevel:" $obj.PerformanceLevel
write-host "Reasontobackoff:" $obj.Reasontobackoff
write-host "ServerObjects:" $obj.ServerObjects
write-host "ServerObjectsCreated:" $obj.ServerObjectsCreated
write-host "ServersCurrentlyUnavailable:" $obj.ServersCurrentlyUnavailable
write-host "ServersUnavailable:" $obj.ServersUnavailable
write-host "StemmersCached:" $obj.StemmersCached
write-host "SystemIOtrafficrate:" $obj.SystemIOtrafficrate
write-host "ThreadsAccessingNetwork:" $obj.ThreadsAccessingNetwork
write-host "Threadsblockedduetobackoff:" $obj.Threadsblockedduetobackoff
write-host "ThreadsInPlugins:" $obj.ThreadsInPlugins
write-host "TimeOuts:" $obj.TimeOuts
write-host "Timestamp_Object:" $obj.Timestamp_Object
write-host "Timestamp_PerfTime:" $obj.Timestamp_PerfTime
write-host "Timestamp_Sys100NS:" $obj.Timestamp_Sys100NS
write-host "WordBreakersCached:" $obj.WordBreakersCached
write-host
write-host "########"
write-host
}
