Difference between revisions of "Get-counter"
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
https://adamtheautomator.com/powershell-get-process/ | 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 | ||
+ | ``` |
Revision as of 20:34, 16 July 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