Difference between revisions of "Get-counter"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
``` | ``` | ||
+ | |||
+ | https://stackoverflow.com/questions/16223648/what-is-cooked-value-returning-in-powershells-get-counters-cmdlet | ||
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.2 | https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.2 |
Revision as of 16:10, 30 August 2022
get-counter '\Process(*)\IO Read Bytes/sec' | Format-List Get-Counter '\Processor(_Total)\% Processor Time' Get-Counter '\Memory\Available MBytes' (Get-Counter '\Process(*)\% Processor Time').CounterSamples | Where-Object {$_.CookedValue -gt 5} Get-Process winword, explorer | Format-List *
https://adamtheautomator.com/powershell-get-process/
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tasklist
Get-Counter '\Process(*)\% Processor Time' | Select-Object -ExpandProperty countersamples| Select-Object -Property instancename, cookedvalue| ? {$_.instanceName -notmatch "^(idle|_total|system)$"} | Sort-Object -Property cookedvalue -Descending| Select-Object -First 25| ft InstanceName,@{L='CPU';E={($_.Cookedvalue/100/$env:NUMBER_OF_PROCESSORS).toString('P')}} -AutoSize
Get-Process | Sort-Object -Property 'CPU' -Descending | Select-Object -First 10
Get-CimInstance -ClassName Win32_Process | Format-List -Property *