How to kill a process in cmd

Source: Internet
Author: User

 

Taskkill [/S system [/u username [/P [Password]
{[/FI filter] [/PID processid |/IM imagename]} [/T] [/F]

Description:
Use this tool to terminate a task by process ID (PID) or image name.

Parameter List:
/S system specifies the remote system to connect.

/U [domain \] User specifies the user context in which the command should be executed.

/P [Password] specifies a password for the provided user context. If ignored, the following message is displayed:
Input.

/FI filter apply filter to select a group of tasks.
"*" Is allowed "*". For example, the image name EQ Acme *

/PID processid specifies the PID of the process to be terminated.
Use tasklist to obtain the PID.

/IM imagename specifies the image name of the process to be terminated. Wildcard '*' can be used
Specify the names of all tasks or images.

/T terminate the specified process and its sub-processes.

/F specifies to force terminate the process.

/? Displays help messages.

Filter:
Valid value of the filter name Operator
---------------------------------------------------
Status EQ, ne running |
Not responding | unknown
Imagename EQ, ne image name
Pid eq, NE, GT, LT, GE, le PID Value
Session EQ, NE, GT, LT, GE, le session number.
Cputime EQ, NE, GT, LT, GE, le CPU time, format:
Hh: mm: Ss.
Hh-hour,
Mm-min, SS-Sec
Memusage EQ, NE, GT, LT, GE, and Le memory usage, in KB
Username EQ, ne username, in the format of [domain \] user
Modules EQ, ne DLL name
Services EQ, ne service name
Windowtitle EQ, ne window title

Description
----
1) The/IM switch can use the wildcard '*' only when the filter is applied '*'.
2) the remote process must always be forcibly terminated (/F.
3) when a remote machine is specified, the "windowtitle" and "status" filters are not supported.

For example:
Taskkill/IM notepad.exe
Taskkill/PID 1230/PID 1241/PID 1253/T
Taskkill/f/IM cmd.exe/T
Taskkill/f/fi "PID Ge 1000"/fi "windowtitle ne untitle *"
Taskkill/f/fi "username EQ nt authority \ System"/IM notepad.exe
Taskkill/S system/u domain \ Username/fi "username ne Nt *"/IM *
Taskkill/S system/u username/P password/fi "imagename EQ note *"

[Name: Kill process] [tags: Tips]

[From alphawu. Blog]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.