I know that, in Windows, you could do the following to see what processes are attached to a port:
netstat -a -b
However, how would you limit the display to ports attached to a specific process? I looked at findstr but that doesn't help because the process' executable is not mentioned on the same line as the port information:
PS C:\Users\nimmylebby> netstat -a -b [svchost.exe] TCP [::]:49154 NIMMY-LAPTOP:0 LISTENING Schedule [svchost.exe] TCP [::]:49155 NIMMY-LAPTOP:0 LISTENING [services.exe] TCP [::]:49156 NIMMY-LAPTOP:0 LISTENING [lsass.exe] UDP 0.0.0.0:500 *:* IKEEXT [svchost.exe] UDP 0.0.0.0:3702 *:* FDResPub [svchost.exe]
Anyone have any clue?