I want to get the value that is shown in task manager for any process in the CPU column in powershell.
I tried using
Get-Process ProcessName | Select-Object -Property CPU
but it only returns the time spent.
powershell
I want to get the value that is shown in task manager for any process in the CPU column in powershell.
I tried using
Get-Process ProcessName | Select-Object -Property CPU
but it only returns the time spent.
Best Answer
Try using the
Get-Counter
command which pulls the data from the system's performance monitor. For your example, it would look like this:An example, using chrome: