configmgr-hub-selfhost/get top 2 process.ps1

3 строки
134 B
PowerShell

Get-Process | Group-Object ProcessName | ForEach-Object {
$_ | Select-Object -ExpandProperty Group | Select-Object -First 2
}