How do I check which process is using a particular port with netstat on Windows?

I do something similar, but I like to pair it with tasklist in the terminal itself:

c
Copy
Edit
netstat -aon | findstr :8080
tasklist /FI "PID eq <the-pid-you-found>"

This way I don’t even have to open Task Manager.

It’s super handy when I’m scripting diagnostics or working over remote desktop.