Skip to content

Instantly share code, notes, and snippets.

@iamshreeram
Created October 29, 2017 18:48
Show Gist options
  • Save iamshreeram/9ce980859d2c4c82dcad6c93018cb6c8 to your computer and use it in GitHub Desktop.
Save iamshreeram/9ce980859d2c4c82dcad6c93018cb6c8 to your computer and use it in GitHub Desktop.
This batch script finds the process / image based on users input port.
::This script finds the process / image based on users input port
::Sample port (8888) is used in this
for /f "tokens=5" %a in ('netstat -aon ^| findstr 8888') do tasklist /FI "PID eq %a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment