Answer the question
In order to leave comments, you need to log in
How to kill a process using a specific port in Windows?
Users often hang the process of one of the add-ons for Internet Explorer (KKM ATOL), the process is a tab in the browser. IE sometimes won't terminate a hung process even after closing the entire "browser".
The process is monitored by the team:
netstat -ano | find /I "6220" | find /I "ESTABLISHED"
TCP 10.32.0.34:60541 10.32.0.146:6220 ESTABLISHED 3520
, where 3520 is the PID of the process. taskkill /f /im iexplore.exe
doing it is not an option, since the whole browser is being killed, not the tab, and users have to log in again in each tab again. Answer the question
In order to leave comments, you need to log in
will give an error, since the input to taskkill does not get the PID, but the whole line from netstat.The command
SET
may truncate the string. @echo off
for /f "tokens=1 delims==" %%i in ('"netstat -ano | find /I "6220" | find /I "ESTABLISHED" "') do set var=%%i
taskkill /F /PID %var:~-4%
taskkill /F /PID pid_number
https://docs.microsoft.com/en-us/windows-server/ad...
ortaskkill /?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question