Kill Process with cmd taskkill

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.

  1. Open the command prompt as the current user or as Administrator.
  2. 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 | moreWindows 10 Tasklist
  3. To kill a process by its PID, type the command:taskkill /F /PID pid_number
  4. 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
Windows 10 Taskkill By Pid


To kill a process by its name:

taskkill /IM "notepad.exe" /F
Windows 10 Taskkill By Name


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.

  1. Open PowerShell. If required, run it as Administrator.
  2. Type the command Get-Process to see the list of running processes.
  3. To kill a process by its name, execute the following cmdlet:Stop-Process -Name “ProcessName” -Force
  4. To kill a process by its PID, run the command:Stop-Process -ID PID -Force

Examples:
This command will close the notepad.exe process.

Stop-Process -Name "Notepad" -Force
Windows 10 Powershell Kill A Process

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

That’s it.

CALL FOR APPOINTMENT
Verified by MonsterInsights