1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Sacar el último proceso ejecutado Get-Process | select StartTime,name | sort StartTime # Preguntar si aparece algo nuevo (en bucle infinito) $algo = Get-Process | select name for(1) { $algo2 = Get-Process | select name Compare-Object -Property name $algo $algo2 } # Solución acortar -first (f) ps|sort cpu -D|select name,cpu -f 5 # Solución completa acortada Set-Alias -Name p -value ps Set-Alias -Name s -value select Set-Alias -Name o -value sort p|o cpu|s -l 5 >>1 |