tacticalrmm/scripts_wip/Win_Processes_Retrieve_Top.ps1

4 lines
287 B
PowerShell
Raw Normal View History

2021-04-27 17:11:30 +00:00
#Needs Command parameter updates
Get-WmiObject Win32_PerfFormattedData_PerfProc_Process | ` where-object{ $_.Name -ne "_Total" -and $_.Name -ne "Idle"} | ` Sort-Object PercentProcessorTime -Descending | ` select -First 5 | ` Format-Table Name,IDProcess,PercentProcessorTime -AutoSize