1 2 3 4 5 6 7 8 9 10 11 12 13 |
$resultado= Get-NetTCPConnection -State Established | %{ "=============" $_.RemoteAddress "---------------------" $_.LocalAddress,$_.LocalPort,$_.State,$_.RemoteAddress,$_.RemotePort,$_.OwningProcess,(Get-Process -id $_.OwningProcess).Name "---------------------" (Get-Process -id $_.OwningProcess).TotalProcessorTime, (Get-Process -id $_.OwningProcess).StartTime, (Get-Process -id $_.OwningProcess).cpu "---------------------" $var = "ProcessId = "+($_.OwningProcess) (Get-WmiObject -Class win32_process -Filter $var).CommandLine "---------------------" } $resultado |