How to Kill Process from CMD/PowerShell Windows 10/11

Why You Need to Use Windows PowerShell/CMD Kill Process

As you know, the operating system will create a process for the executable file when you start running an app. This process contains the program code and its current activity. In addition, you can find the Process Identifier (PID) assigned by Windows to identify each process.

Sometimes you have to kill a process if an app is not responding or behaves unexpectedly, system resources are much occupied, or other reasons. When it comes to killing a process, most people may open Task Manager by pressing Ctrl + Shift + Esc keys and then right-click the Process and select End task.

Sometimes, however, Task Manager may run into various issues such as “ end task not working”, “ Task Manager not responding”, “ Task Manager has been disabled by your administrator “, and so on. In this case, you can kill process CMD/PowerShell. How to make CMD kill process IN Windows 10/11? Let’s keep reading.

How to Kill Process CMD/PowerShell in Windows 10/11

This part will show you how to kill process Windows command line/PowerShell. You can choose one according to your preference.

# 1. CMD Kill Process

How to let CMD kill process in Windows 10/11? Here you need to use the taskkill command that allows a user to kill a task from a Windows command line by PID or image name. This command works like the “End task” option in Task Manager.

Here’s how to kill task CMD via the taskkill command. Since some apps may run as administrators, you need to open an elevated Command Prompt window to kill them. For that:

Step 1. Type cmd in the Search box, and then right-click the Command Prompt window and select Run as administrator. Then click on Yes in the UAC window to confirm the admin access.

Step 2. In the elevated command prompt window, type the following command and hit Enter to show all the currently running processes in your system.

tasklist | more

Step 3. To kill a process by its PID, run the following command. Here we take PID 1704 for example.

taskkill /F /PID pid_number

If you want to kill task CMD by its name, run the following command. For example, to kill the YourPhone.exe process:

taskkill /IM “process name” /F

If you want to kill multiple processes by their name simultaneously, run the following command:

taskkill /IM Process Name /IM Process Name /F

If you want to kill multiple processes by their PID simultaneously, run the following command:

taskkill /PID PID /PID PID /F

If you want to learn more taskkill commands, you also can run the taskkill /? Command.

# 2. PowerShell Kill Process

In addition, you can make Windows kill process command line via PowerShell. Here’s how to do that:

Step 1. Type PowerShell in the Search box, and then right-click the Windows PowerShell app and select Run as administrator. Then click on Yes to confirm that.

Step 2. In the elevated PowerShell window, type the following command and hit Enter to show all the running processes on your system.

Get-Process

Step 3. If you want to kill a process by its name, run the following command.

Stop-Process -Name “ProcessName” -Force

If you want to kill a process by its PID, run the following command.

Stop-Process -ID PID -Force

ABOUT THE AUTHOR

Position: Columnist

Ariel is an enthusiastic IT columnist focusing on partition management, data recovery, and Windows issues. She has helped users fix various problems like PS4 corrupted disk, unexpected store exception error, the green screen of death error, etc. If you are searching for methods to optimize your storage device and restore lost data from different storage devices, then Ariel can provide reliable solutions for these issues.

Originally published at https://www.partitionwizard.com on June 9, 2022.

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store