I am trying to determine what command I can use to check if a port is in use in Windows. I looked into Command line for looking at specific port but none of the answer fits exactly what I am looking for.
For example I want to look whether port 500 is in use, I would use netstat βan | findstr /r :500
but the results would appear to be
TCP 0.0.0.0:5000 0.0.0.0:0 LISTENING
TCP [::]:5000 [::]:0 LISTENING
UDP 0.0.0.0:500 *:*
UDP 127.0.0.1:50027 *:*
UDP [::]:500 *:*
That's not exactly what I want. I tried netstat -an | findstr /r :500[\s]+
then nothing would show. Not sure how I can fix the query.
Any ideas?