kill Process based on port number

来源:互联网 发布:linux应用增量更新 编辑:程序博客网 时间:2024/05/24 04:07

Windows Command:

1: check the process occupying  the PortNumer, return PID.  can kill the process using task manager once you know PID.

C:\> netstat -aon | findstr "PortNumer"


 2: list the process name according to  PID, return process detailed information. can kill the process using task manager once you know Process name.
C:\>tasklist | findstr "PID"


 3: kill the process base on ProcessName
C:\>taskkill /f /t /im ProcessName.exe
0 0