Find the Heaviest CPU Consumers with PowerShell
Rank running processes by CPU time using Get-Process and Sort-Object.
01Command
$ Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, Id, CPU02What it does
The CPU property of a process object counts total processor seconds the process has used since it started, so long-running busybodies climb to the top of a descending sort. Sort-Object CPU -Descending ranks every process, and Select-Object -First 10 trims the list to a readable size. For live per-second CPU percentages, Task Manager or Get-Counter is the better tool.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-Process — List running processesEvidence: Lists the CPU property among Get-Process output fields and shows pipeline usage with Sort-Object/Select to filter and rank processes.
- Get-ProcessEvidence: Get-Process returns process objects including the CPU property (processor time used); the examples show piping to Sort-Object and Select-Object for ranking, e.g. Sort-Object WS / select the first N objects.
Last verified: 2026-09-19 · Category: System & Settings
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Register a recurring Windows task entirely from the command line — ideal for scripts, cleanup jobs, and monitoring probes you want to run unattended.
Create or update a .zip from any files or folder contents straight from PowerShell.