PowerShell PowerShell if(Get-CimInstance win32_service | where ProcessId -eq (Get-Process -id (Get-NetTCPConnection -LocalPort 443).OwningProcess).id) { "Es un servicio" } else { "Es un proceso" } 12345678 if(Get-CimInstance win32_service | where ProcessId -eq (Get-Process -id (Get-NetTCPConnection -LocalPort 443).OwningProcess).id){ "Es un servicio"}else{ "Es un proceso"}