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]