Three options:
1. powershell:
TCP
Get-Process -Id (Get-NetTCPConnection -LocalPort YourPortNumberHere).OwningProcess
UDP
Get-Process -Id (Get-NetUDPEndpoint -LocalPort YourPortNumberHere).OwningProcess
2. cmd:
netstat -a -b
(Add -n to stop it trying to resolve hostnames, which will make it a lot faster.)
-a Displays all connections and listening ports.
-b Displays the executable involved in creating each connection or listening port. In some cases well-known executables host multiple independent components, and in these cases the sequence of components involved in creating the connection or listening port is displayed. In this case the executable name is in [] at the bottom, on top is the component it called, and so forth until TCP/IP was reached. Note that this option can be time-consuming and will fail unless you have sufficient permissions.
-n Displays addresses and port numbers in numerical form.
-o Displays the owning process ID associated with each connection.
3. Native Windows GUI:
- Start menu → All Programs → Accessories → System Tools → Resource Monitor
Or Run resmon.exe , or from Task Manager's performance tab click on 'Open Resource Monitor' at the bottom, then go to the Network Tab, and look at the listening ports list.