Kill a process using Taskkill
Note: Some processes are running as Administrator (elevated). In order to kill them, you need to open an elevated command prompt instance.
- Open the command prompt as the current user or as Administrator.
- Type tasklist to see the list of running processes and their PIDs. Since the list might be very long, you can use a pipe character with the more command.tasklist | more
- To kill a process by its PID, type the command:taskkill /F /PID pid_number
- To kill a process by its name, type the commandtaskkill /IM “process name” /F
For example, to kill a process by its PID:
taskkill /F /PID 1242
To kill a process by its name:
taskkill /IM "notepad.exe" /F
Taskkill supports many useful options which you can use to terminate apps. You can learn them by running it as follows:
taskkill /?. Using taskkill, you can close all not responding tasks at once in Windows 10.
Kill a process using PowerShell
Note: To kill a process which runs elevated, you need to open PowerShell as Administrator.
- Open PowerShell. If required, run it as Administrator.
- Type the command
Get-Processto see the list of running processes.
- To kill a process by its name, execute the following cmdlet:Stop-Process -Name “ProcessName” -Force
- To kill a process by its PID, run the command:Stop-Process -ID PID -Force
This command will close the notepad.exe process.
Stop-Process -Name "Notepad" -Force
The next command will close a process with PID 2137.
Stop-Process -ID 2137 -Force
If you need to kill a Store app, see the following article:
How to Terminate Store Apps in Windows 10