Details of a thread in Powershell

How can I get the CPU consumption of all threads running in a process thru powershell, in a format similar to this.

I can’t find any processor information when I run

 (gwmi win32_thread)[0]
. And the “Start Address” is numeric !?!

You’ll probably need to query performance counters for this information. Check out the Win32_PerfFormattedData_PerfProc_Thread class. It has (among other things), PercentPrivilegedTime, PercentUserTime, and PercentProcessorTime properties.

“Start Address” is always numeric, but it’s possible to translate that into funciton names by reading debug symbol files. I’ve never actually written code to do that, and can’t offer much help there. This blog post might be a good place start:

Currently, is there any command line utility to view the “Start address” of a thread as function names.