Created
January 9, 2020 17:32
-
-
Save rasgo-cc/fe01977d8f9d6c4a232522bfa7b4603d to your computer and use it in GitHub Desktop.
Windows killport (kill a process running on a specific port)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM usage: killport.bat <port> | |
@echo off | |
setlocal | |
echo Killing port %1 | |
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":%1"') do taskkill /f /pid %%a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment