Skip to content

Instantly share code, notes, and snippets.

@rifatx
Created March 4, 2022 13:35
Show Gist options
  • Save rifatx/0515ba99954bf899f0aa894f22acf3de to your computer and use it in GitHub Desktop.
Save rifatx/0515ba99954bf899f0aa894f22acf3de to your computer and use it in GitHub Desktop.
List the top 20 memory consuming processes
Get-Process | Group-Object -Property ProcessName | %{ New-Object psobject -Property @{ ProcessName=$_.Name; PrivateMem=($_.Group | Measure-Object PM -Sum).Sum } } | Sort-Object -Descending -Property PrivateMem | Select-Object -First 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment