How to find out what is running on localhost port

Run netstat -a -o | find "9090" and have a look at the far right column. That's the Process ID (PID) of the owning process. Match it up with running processes in Task Manager.


@Evan Anderson answer did not work for me cause I got a message

FIND: Parameter format not correct

so I replaced the Find call with a powershell Select-String

netstat -aon|sls 61456

  TCP    127.0.0.1:61456        0.0.0.0:0              LISTENING       31796

finally I open Task manager and looked sort the PID column looking for 31796

enter image description here

Update

Usually I want to kill these processes so here a powershell script that does not need manual intervention

netstat -aon|sls 5000|%{("$_".substring("$_".LastIndexOf(' '))).Trim()}|%{
    $id=$_
    Get-Process|?{$_.id -eq $id}
}|Stop-Process