Thread - WMI sample in Powershell
The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP 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 Thread WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Thread
Example(s)
$strComputer = "." $objWMi = get-wmiobject -computername localhost -Query "Select * from CIM_Thread" foreach ($obj in $objWmi) { write-host "Caption:" $obj.Caption write-host "CreationClassName:" $obj.CreationClassName write-host "CSCreationClassName:" $obj.CSCreationClassName write-host "CSName:" $obj.CSName write-host "Description:" $obj.Description write-host "ElapsedTime:" $obj.ElapsedTime write-host "ExecutionState:" $obj.ExecutionState write-host "Handle:" $obj.Handle write-host "InstallDate:" $obj.InstallDate write-host "KernelModeTime:" $obj.KernelModeTime write-host "Name:" $obj.Name write-host "OSCreationClassName:" $obj.OSCreationClassName write-host "OSName:" $obj.OSName write-host "Priority:" $obj.Priority write-host "PriorityBase:" $obj.PriorityBase write-host "ProcessCreationClassName:" $obj.ProcessCreationClassName write-host "ProcessHandle:" $obj.ProcessHandle write-host "StartAddress:" $obj.StartAddress write-host "Status:" $obj.Status write-host "ThreadState:" $obj.ThreadState write-host "ThreadWaitReason:" $obj.ThreadWaitReason write-host "UserModeTime:" $obj.UserModeTime write-host write-host "########" write-host }