This tutorial shows the way to kill a running process in Task Manager, PowerShell or Command Prompt on Windows 10/11 .
When you start a service or when you start an application in Windows, the system assigns it an identification number, known as a Process Identifier (PID), which is unique to each running process. If one of the running processes stops responding or uses too many resources then you can terminate it either from the task manager or via commands from the PowerShell or from the Command Prompt.
- Related article: How to Stop, Start and Manage Services in Windows 10/11.
How to Kill a Process in Windows 10/11 with Task Manager, Command Prompt or PowerShell.*
* Note: The first two methods works on Windows 7, 8, 10 & 11 OS.
Method 1. End Process using Task Manager.
To terminate a running program or service using Task Manager:
1. Press CTRL + SHIFT + ESC to open Task Manager.
2. In Processes or in Details tab, click to select the application or the process that you want to terminate and select End Task. *
Method 2. Kill Process with Taskkill command (Command Prompt or PowerShell).
If for any reason you cannot terminate a process with Task Manager, you can use the Taskkill command to terminate it either at the command prompt or in PowerShell.
1. Open PowerShell as Administrator. (or open Command Prompt as Administrator).
2. Give the following command to see a list of all running processes in alphabetical order:
- tasklist /nh |sort
3. Now look on list and notice the name or the PID of the process you want to terminate. *
* e.g. if you want to terminate the OneDrive app, the Process Name is “OnedDrive.exe” & the Process PID is “10628”
4. Now use one of the following TASKKILL commands to kill the process.
4a. To kill the process using its PID use this command:
- taskkill /F /PID ProcessPID
- e.g.: taskkill /F /PID 10628
4b To terminate the process using its Process name
- taskkill /F /IM ProcessName
- e.g.: taskkill /F /IM OneDrive.exe
4c. To kill all instances of a process.
- taskkill /F /IM ProcessName /T
- e.g.: To close all instances of “msedge.exe” give this command: taskkill /F /IM msedge.exe /T
Method 3. Terminate/Kill a Process from PowerShell.
1. Open PowerShell as Administrator. (or Command Prompt as Administrator).
2. Give the following command to see a list with the name and the PID of all running processes:
- tasklist /nh |sort
3. Use one of the following commands to stop a running process from PowerShell:
- kill -id ProcessPID
- e.g.: kill -id 10628
- Stop-Process -ID ProcessPID
- e.g.: Stop-Process -ID 10628
- Stop-Process -Name ProcessName
- e.g.: Stop-Process -Name notepad (Type the process name without the “.exe” extension)
That’s all folks! Did it work for you?
Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.