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: 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: So for Chrome, the program will have a name as chrome.exe. Type and press Enter the following to kill Chrome. The /F switch is used to kill the process forcefully.
To kill a process by its PID, type the command: Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces. 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. Read: How to kill a Not Responding process?
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: To kill a process using its PID, execute the following command: 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. Read next: How to force close a Program which Task Manager cannot terminate? I hope the post was easy to follow.