There are a plethora of commands in Windows 10, which can perform a wide range of functions. As the name implies, Taskkill command implies that this comnand can kill any process running on your Windows 10 PC. Suppose, a process is causing issues on your computer. If you succeed in finding which process is not performing correctly, then you can kill the process by using taskkill command. The taskkill command also works in Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012. Taskkill command can be used to kill one or multiple processes simultaneously. You need to insert the process ID or PID or the image name.
Check out how you can use the command:
taskkill [/s <computer> [/u [<Domain>\]<UserName> [/p [<Password>]]]] {[/fi <Filter>] [...] [/pid <ProcessID> | /im <ImageName>]} [/f] [/t]
Parameter | Description |
---|---|
/s <computer> | This parameter implies the computer name or the IP address of a remote computer. The default computer is the local computer. |
/u <Domain>\<UserName> | This parameter is responsible for running the command with the account permissions of the user, specified by UserName or Domain\UserName. /u can be specified only if /s is specified. The default setup is the permissions of the user who has signed in to the PC issuing the command. |
/p <Password> | This is the password of the user account which is designated in the /u parameter. |
/fi <Filter> | Applies a filter to select a set of tasks. You can use more than one filter or use the wildcard character (\*) to specify all tasks or image names. See the following table for valid filter names, operators, and values. |
/pid <ProcessID> | This parameter means process ID of the process which will be terminated by the taskkill command. |
/im <ImageName> | Specifies the image name of the process to be terminated. Use the wildcard character (\*) to specify all image names. |
/f | Designates the processes required to be forcefully terminated. By default, all remote processes are forcefully terminated. So, in case of remote processes, there is no need to specify. |
/t | Specifies termination of a process and all child processes launched by the process. \ |
Check Out The Important Filter names, operators, and values
Filter Name | Valid Operators | Valid Value(s) |
---|---|---|
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 in the format HH:MM:SS, where MM and SS are between 0 and 59 and HH is any unsigned number |
MEMUSAGE | eq, ne, gt, lt, ge, le | Memory usage in KB |
USERNAME | eq, ne | Any valid user name (User or Domain\User) |
SERVICES | eq, ne | Service name |
WINDOWTITLE | eq, ne | Window title |
MODULES | eq, ne | DLL name |
Check out the example.
Suppose, you want to terminate three processes which respective process ID 1233, 1251, 1253, then wr
taskkill /pid 1233 /pid 1251 /pid 1253
If you need to end a process forcefully, and if the process (e.g. Notepad) was started by the system, then type:
taskkill /f /fi USERNAME eq NT AUTHORITY\SYSTEM /im notepad.exe
Another example, if you need to end all processes that have a process ID greater than or equal to 1000, regardless of their image names, type the following:
taskkill /f /fi PID ge 1000 /im *
That’s all for now. There are many more commands related to taskkill. Hope you liked the article.