Ends one or more tasks or processes. Processes can be killed by process ID or image name.


taskkill [/s Computer] [/u Domain\User [/p Password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f][/t]


/s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.

/u Domain\User : Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.

/p Password : Specifies the password of the user account that is specified in the /u parameter.

/fi FilterName : Specifies the types of process(es) to include in or exclude from termination. The following are valid filter names, operators, and values.



eq, ne

Any valid string.


eq, ne



eq, ne

Any valid string.


eg, ne, gt, lt, ge, le

Any valid positive integer.


eg, ne, gt, lt, ge, le

Any valid session number.


eq, ne, gt, lt, ge, le

Valid time in the format of hh:mm:ss. The mm and ss parameters should be between 0 and 59 and hh can be any valid unsigned numeric value.


eg, ne, gt, lt, ge, le

Any valid integer.


eq, ne

Any valid user name ([Domain\]User).


eq, ne

Any valid string.


eq, ne

Any valid string.

/pid ProcessID : Specifies the process ID of the process to be terminated.

/im ImageName : Specifies the image name of the process to be terminated. Use the wildcard (*) to specify all image names.

/f : Specifies that process(es) be forcefully terminated. This parameter is ignored for remote processes; all remote processes are forcefully terminated.

/t : Specifies to terminate all child processes along with the parent process, commonly known as a tree kill.

/?: Displays help at the command prompt.


The wildcard character (*) is accepted only when specified along with the filters.

Termination for remote processes will always be done forcefully regardless of whether the /f parameter is specified.

Supplying a computer name to the HOSTNAME filter will cause a shutdown and all processes will be stopped.

Use tasklist to determine the Process ID (PID) for the process to be terminated.

Taskkill is a replacement for the Kill tool.


The following examples show how you can use the taskkill command:

taskkill /pid 1230 /pid 1241 /pid 1253
taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe
taskkill /s srvmain /f /im notepad.exe
taskkill /s srvmain /u maindom\hiropln /p p@ssW23 /fi "IMAGENAME eq note*" /im *
taskkill /s srvmain /u maindom\hiropln /fi "USERNAME ne NT*" /im *
taskkill /f /fi "PID ge 1000" /im *

Formatting legend



Information that the user must supply


Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies