Find the process ID
Command TaskList /?
Find PID TaskList | findstr "8080"
TASKLIST [/ S System [/ the U-username [/ P [password]]]]
[/ M [Module1] | / the SVC | / V] [/ the FI filter] [/ FO the format] [/ NH2]
Description:
The tool displays a list of processes running on local or remote machine current.
Parameter List:
/ M [Module] list all tasks currently using the exe / dll name given.
If you do not specify a module name, display all the modules loaded.
/ SVC displays each process hosted service.
/? Displays this help message.
View Port occupation
netstat -ano
netstat -ano|findstr "49157"
end process
taskkill /f /t /im Tencentdl.exe
taskkill /F /PID PID
TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
Description:
Use this tool in accordance with the process ID (PID) or image name terminate the task.
Parameter List:
/ S System Specifies the remote system to connect to.
/U [domain\]user 指定应该在哪个用户上下文执行这个命令。
/P [password] 为提供的用户上下文指定密码。如果忽略,提示
输入。
/FI filter 应用筛选器以选择一组任务。
允许使用 "*"。例如,映像名称 eq acme*
/PID processid 指定要终止的进程的 PID。
使用 TaskList 取得 PID。
/IM imagename 指定要终止的进程的映像名称。通配符 '*'可用来
指定所有任务或映像名称。
/T 终止指定的进程和由它启用的子进程。
/F 指定强制终止进程。