https://stackoverflow.com/a/48199
#TCP (powershell)
Get-Process -Id (Get-NetTCPConnection -LocalPort YourPortNumberHere).OwningProcess #UDP (powershell) Get-Process -Id (Get-NetUDPEndpoint -LocalPort YourPortNumberHere).OwningProcess
#cmd
C:\> netstat -a -b
(Add -n to stop it trying to resolve hostnames, which will make it a lot faster.)