1 2 3 4 5 6 7 8 |
$serviciosactivos = Get-CimInstance win32_service | where state -eq "running" foreach($servicio in $serviciosactivos) { Write-Host -ForegroundColor yellow -BackgroundColor Red ` (Get-Process -id $servicio.ProcessId).Name "->" ` (Get-Process -id $servicio.ProcessId).path } |