Returns top 10 applications or processes hogging memory the most.
To learn more about queries, check this guide
SELECT pid, name, ROUND((total_size * '10e-7'), 2) AS memory_used FROM processes ORDER BY total_size DESC LIMIT 10;
$processes = Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 10
$results = $processes | Select-Object @{Name="pid";Expression={$_.Id}},
@{Name="name";Expression={$_.ProcessName}},
@{Name="memory_used";Expression={[math]::Round($_.WorkingSet64 * 10e-7, 2)}}
$results | Format-Table -AutoSize
PowerShell commands are currently work in progress, contributions welcome.