Introduction to the Windows Taskkill command

Source: Internet
Author: User

1. Introduction

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

2. Grammar

TASKKILL [/S system [/u username [/p [password]]]
{[/FI filter] [/pid ProcessID |/im imagename]} [/T] [/F]

2.1 Parameter list:
/S system Specifies the remote system to connect to.
/u [domain\]user Specifies the user context in which the command should be executed.
/p [Password] specifies the password for the provided user context. If omitted, prompt for input.
/FI Filter applies filters to select a group of tasks. Allow use of "*". For example, image name EQ acme*
/pid ProcessID Specifies the PID of the process to be terminated. Use TaskList to obtain PID.
/im imagename Specifies the image name of the process to be terminated. The wildcard ' * ' can be used to specify all task or image names.
/T terminates the specified process and the child processes that are enabled by it.
/f Specifies that the process is forced to terminate.

/? Displays the help message.
2.2 Filters:
Filter name valid operator valid value
-----------   ---------------           -------------------------
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, formatted as HH:MM:SS. HH-When, MM-min, ss-Sec
Memusage eq, NE, GT, lt, ge, le memory usage, in kilobytes
USERNAME eq, NE user name, in the format [domain\]user
MODULES eq, NE DLL name
Services EQ, NE service name
WindowTitle eq, NE window title
Description
----
1) The/IM switch will use the wildcard ' * ' only if the filter is applied.
2) The remote process is always forced (/f) to terminate.
3) "WindowTitle" and "STATUS" filters are not supported when specifying a remote machine.

3, 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/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*"

Introduction to the Windows Taskkill command

Related Article

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.