Windows 11/10 offers Task Manager not only to understand which program or application is taking how much of the resource, but it allows you to terminate or kill apps that stop responding. If there is one process that is causing the problem, you can easily manage them.
In the case of multiple processes taking a lot of CPU resources, Task Manager is cumbersome to use. So, in this post, we will learn how to kill one or multiple processes using the Command Prompt or PowerShell.
Kill a Process using Command Line
Using Command Prompt
The functions of Task Manager can be achieved using command-line based tools— Tasklist and Taskkill. To kill, its a two-step process.
- First, we need to find the Process ID using Tasklist,
- Second, we kill the program using Taskskill.
Open Command Prompt with admin privileges by typing cmd in the Run prompt (Win + R) followed by pressing Shift + Enter.
To view the processes, type the following and hit Enter:
Tasklist /fo table
Note the process ID listed under the Process ID column.
You can also kill a program using the exact name.
To kill a process by its name, type the command:
Taskkill /IM "process name" /F
So for Chrome, the program will have a name as chrome.exe.
Type and press Enter the following to kill Chrome.
Taskkill /IM chrome.exe /F
The /F switch is used to kill the process forcefully.
To kill a process by its PID, type the command:
Taskkill /F /PID pid_number
Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces.
Taskkill /PID 2536 /PID 3316 /F
For each process, you will have to add /PID option, and then execute it.
That said, here is one thing you should know. These days an application spans itself into smaller programs, and each of them has a different process id. Taking an example of Chrome, it has a PID for the extension, one for subroutines, and so on. Finding the primary process i.e., parent program ID is not easy, and so if you want to kill an application, it is best to use process namer to kill it.
Kill process using PowerShell
To see the list of running processes, execute the following command in an elevated PowerShell prompt:
To kill a process using its name, execute the following command:
Stop-Process -Name "ProcessName" -Force
To kill a process using its PID, execute the following command:
Stop-Process -ID PID -Force
There are many alternatives to Task Manager if it is not available. Programs such as Process Explorer from Microsoft is an excellent add-on which offers more details about the process, and even allow you to kill multiple applications in one go. However, Taskview, Taskkill or Stop-Process, can be used to kill applications on remote computers as well, which is not possible for all third-party programs.
I hope the post was easy to follow.