How to kill process windows cmd

We can kill a process from GUI using Task manager. If you want to do the same from command line., then taskkill is the command you are looking for. This command has got options to kill a task/process either by using the process id or by the image file name.

Kill a process using image name:

We can kill all the processes running a specific executable using the below command.

taskkill /IM executablename

Example:
Kill all processes running mspaint.exe:

c:\>taskkill /IM mspaint.exe
SUCCESS: Sent termination signal to the process "mspaint.exe" with PID 1972.

Kill a process forcibly

In some cases, we need to forcibly kill applications. For example, if we try to to kill Internet explorer with multiple tabs open, tasklist command would ask the user for confirmation. We would need to add /F flag to kill IE without asking for any user confirmation.

taskkill /F /IM iexplore.exe

/F : to forcibly kill the process. If not used, in the above case it will prompt the user if the opened pages in tabs need to be saved.

To kill Windows explorer, the following command would work

C:\>taskkill /F /IM explorer.exe
SUCCESS: The process "explorer.exe" with PID 2432 has been terminated.

The above command would make all GUI windows disappear. You can restart explorer by running ‘explorer’ from cmd.

C:\>explorer

Not using /F option, would send a terminate signal. In Windows 7, this throws up a shutdown dialog to the user.

C:\>taskkill /IM explorer.exe
SUCCESS: Sent termination signal to the process "explorer.exe" with PID 2432.
C:\>

Kill a process with process id:

We can use below command to kill a process using process id(pid).

taskkill /PID  processId

Example:
Kill a process with pid 1234.

taskkill /PID 1234

Kill processes consuming high amount of memory

taskkill /FI "memusage gt value"

For example, to kill processes consuming more than 100 MB memory, we can run the below command

taskkill /FI "memusage gt 102400"

More examples

Sometimes applications get into hung state when they are overloaded or if the system is running with low available memory. When we can’t get the application to usable state, and closing the application does not work, what we usually tend to do is kill the task/process. This can be simply done using taskkill command.

To kill Chrome browser from CMD

Taskkill /F /IM Chrome.exe

Kill Chromedirver from command line

Taskkill /F /IM Chromedriver.exe

To kill firefox browser application

taskkill /F /IM firefox.exe

To kill MS Word application(Don’t do this if you haven’t saved your work)

taskkill /F /IM WinWord.exe

Sometimes, the command window itself might not be responding. You can open a new command window and kill all the command windows

taskkill /F /IM cmd.exe

This even kills the current command window from which you have triggered the command.

Multitasking with many apps and programs in the background can become difficult to manage and kill the processes running in the background using just the Task Manager or even with tools like Microsoft Process Explorer. However, another way to kill tasks and processes is from the command line in Windows.

However, you can open the Task Manager, right-click the process, and then click “End Task” to kill off the process. You can also terminate a specific process from the Details tab in the Task Manager. Sometimes you encounter issues with the Task Manager itself. For times like these, you may need to kill a process using the command line, which includes both the Command Prompt and Windows PowerShell.

In this article, we show you multiple ways to kill a process in Windows using Command Line.

This Page Covers

Why use the command line to terminate a process?

Although a normal user will not require killing processes using the command line, there are several use cases where command line tools are much better than their visual counterparts like the task manager. The following command line tools can be used in the following scenarios:

  • Troubleshooting: Some processes are simply stubborn. They just stop responding and refuse to die. In such a condition, killing them forcefully using the command line is an easier and safer option.
  • System administration: If you are a sysadmin, you should be a fan of command line utilities. These tools save a lot of work and time. You can run these commands remotely throughout your network to troubleshoot systems remotely.
  • Script Automation: If you are a developer and need to start or stop processes in Windows, you will need these command line tools for automation.
  • Virus prevention: If your system gets infected with viruses, it will simply not let you kill the compromised processes, as they will respawn upon kill. In this case, you can automate a monitoring process where the process is killed as soon as it starts.

There are several other use cases, but these are the most common ones.

How to Kill a Process from Command Prompt

You can kill the process in cmd using the taskkill command. However, you must either know its Process Identifier (PID) or the name of the process before you can end it.

To view and list the tasks and processes currently running on your computer, run the following command in an elevated Command Prompt:

Tasklist

List all running processes

List all running processes

Note either the name under the Image name column or the PID number of the task you want to kill. These will be used in the cmdlets to kill the respective process.

Once you have either the name or the PID of the task, use either of the following cmdlets to kill the process:

  • Kill task using process name in Command Prompt:

    Replace [ProcessName] with the name of the process.

    taskkill /IM "[ProcessName]" /F

    Kill process from Command Prompt using process name

    Kill process from Command Prompt using process name
  • Kill task using PID in Command Prompt:

    Replace [PID] with the Process ID.

    taskkill /F /PID [PID]

    Kill process from Command Prompt using process ID

    Kill process from Command Prompt using a process ID

If you are using earlier versions of Windows, like Windows 7, Windows Vista or even Windows XP, you can use tskill command, which is similar to taskkill but limited in functionality. You just need to provide the process ID to kill a task using tskill command:

tskill process-id

Replace process-id with the actual process ID. For example,

tskill 1234

How to Kill a Process from Windows PowerShell

Similar to the Command Prompt, you can also kill processes using PowerShell. But first, we must get the name or the process ID for the process to kill.

To obtain a list of the running processes in PowerShell, run the following command in PowerShell with elevated privileges:

Get-Process

List all running processes in PowerShell

List all running processes in PowerShell

From here, note down the process name or the PID (in the ID column) of the process that you want to kill, and then use it in the following commands:

Note: Unlike the Command Prompt, Windows PowerShell shows no output once a process is killed.

  • Kill task using process name in PowerShell:

    Replace [ProcessName] with the name of the process.

    Stop-Process -Name "[ProcessName]" -Force

    Kill process from PowerShell using process name

    Kill process from PowerShell using process name
  • Kill task using PID in PowerShell:

    Replace [PID] with the Process ID.

    Stop-Process -ID [PID] -Force

    Kill process from PowerShell using process ID

    Kill process from PowerShell using a process ID

How to Kill a Process using WMIC

Windows Management Instrumentation Command-Line (WMIC) is a useful command line tool to perform administrative tasks especially for sysadmins and power users. You can terminate the process using wmic command.

Please note all the below mentioned commands will only work if you open Command Prompt, PowerShell or Terminal as an administrator.

wmic process where "ProcessId='process-id'" delete

Replace process-id with the actual process ID. For example,

wmic process where "ProcessId='1234'" delete

You can also terminate the process using its name:

wmic process where "name='process-name'" delete

Replace process-name with the actual process name. For example,

wmic process where "name='Skype.exe'" delete

If there are multiple processes by the same name, this command will kill all of them. For example, the above mentioned command will delete all instances with the name Skype.exe.

wmic commands to delete a process

wmic commands to delete a process

How to Kill a Process using SysInternals PsKills

PsKill is a tiny tool that comes with the PsTools Suite by SysInternals. This is a command-line tool used to kill processes, both locally and remotely on other computers on the network.

Although it was designed for WindowsNT and Windows 2000 that did not include the other command-line tools (Killtask and Stop-Process), PsKill can still be used to end processes.

Learn how to manage processes and services on remote computers.

Use the following steps to download and use PsKill to kill tasks using the command line on a Windows computer:

  1. Start by downloading PsTools.

    Download PSTools

    Download PSTools
  2. Extract the contents of the PsTool file.

    Extract PsTools

    Extract PsTools
  3. Launch an elevated Command Prompt and then use the CD cmdlet to change your directory to the extracted PsTools folder.

    CD [PathToPsTools]

    Change directory to PsTools folder

    Change directory to PsTools folder
  4. Run the following command to list all the running processes:

    PsList

    List all running processes using PsList

    List all running processes using PsList

    Note down the name of the process that you want to kill.

  5. Now use the following command to kill a process using its name:

    PsKill.exe [ProcessName]

    Kill process using PsKill

    Kill process using PsKill

As you can see from the image above, the respective process will be killed, and the associated service or program will be terminated.

Ending Thoughts

Even without the use of the Task Manager, there are multiple ways of killing a task or a process directly from the command line. You can even use these commands in scripts to end a Windows process.

On top of that, you can choose whether to kill a process using its name or its PID. Either way, Command Prompt and Windows PowerShell can be used with both native and external commands for this purpose. Not only that, but you can also use these commands in Windows Terminal for the same purpose.

If you are a sysadmin who wants quick and convenient methods to kill running processes, the given command line methods just might be the most convenient way of accomplishing it.

We use the taskkill command to terminate applications and processes in the Windows command prompt. Running taskkill is the same as using the End task button in the Windows Task Manager.

With taskkill, we kill one or more processes based on the process ID (PID) or name (image name). The syntax of this command is as follows:

taskkill /pid PID
taskkill /im name

You can use the tasklist command to find the PID or image name of a Windows process.

using the tasklist command to find the PID or image name of a process

Using the tasklist command to find the PID of a Process.

The /F option tells Windows to force kill the process:

taskkill /f /im notepad.exe

Kill a Process by PID

In the following example, we run the taskkill command to terminate a process with a PID of 1000:

taskkill /f /pid 3688

The multiple processes can be terminated at once, as shown in the following example:

taskkill /pid 3688 /pid 4248 /pid 4258

Kill a Process by Name

To kill a process by its name, we use the /IM option. In the following example, we run the taskkill command to terminate the notepad.exe process:

taskkill /im notepad.exe

The /t option tells Windows to terminate the specified process and all child processes. In the following example, we force kill Microsoft Edge and its child processes:

taskkill /f /t /im msedge.exe

Command Options

/S Specifies the IP Address or name of the remote system to connect to.
/U Specifies the name of the Windows user under which the command should execute.
/P Password for the user. Prompts for input if omitted.
/FI This option is to apply filters (see examples below).
/PID Specifies the PID of the process to be terminated.
/IM Specifies the image name of the process to be terminated.
/T Terminates the specified process and its child processes (end all tasks).
/F Forcefully kill a process.

Examples

Terminate a process with a PID of 4000:

taskkill /pid 4000

Terminate spoolsv.exe (which is the Print Spooler service on Windows):

taskkill /im spoolsv.exe

Using /f and /t options to forcefully terminate the entire process tree of the Microsoft Edge browser:

taskkill /f /t /im msedge.exe

taskkill command

Force kill any process that starts with the name note:

taskkill /f /t /im note*

In the following example, we terminate all processes that are not responding by using a filter:

taskkill /f /fi "status eq not responding"

In the above example, eq stands for equal. You can use the following filters with the /fi option.

taskkill filters

Taskkill Filters

Run taskkill command on a remote computer:

taskkill /s 192.168.1.100 /u robst /pid 5936

In the above example, the process with PID 5936 will be terminated on a remote computer with an IP address of 192.168.1.100.

Note that the Windows Firewall must be configured on the remote computer to allow the taskkill command. Click the link below for instructions on how to do it.

How to allow tasklist and taskkill commands from Windows Firewall

All right, here’s the end of this tutorial. While working on the CMD, you can run taskkill /? to display the help page, command options, and filters of the tasklist command.

The PowerShell equivalent to the taskkill is the Stop-Process cmdlet. But you can always use taskkill in PowerShell as well.

  • Home
  • Partition Manager
  • CMD Kill Process: How to Kill Process in Command Prompt

By Ariel | Follow |
Last Updated

A log of users are unclear about how to kill process CMD/PowerShell in Windows 10/11. Don’t worry. This post of MiniTool walks you through detailed steps on the PowerShell/CMD kill process operations.

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.

select End task

Tip: Also, you can navigate to the Details tab in Task Manager to check the Process ID (PID), Status, CPU, User name, and Memory usage.

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.

run CMD as administrator

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

run tasklist command in the elevated Command Prompt window

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

terminate a task using cmd

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

kill a process CMD by its name

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

taskkill /IM Process Name /IM Process Name /F

kill multiple processes simultaneously by their name

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

taskkill /PID PID  /PID PID /F

kill multiple processes simultaneously by its PID

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

run Taskkill command to know details

# 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

run get process in PowerShell

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

Ariel

Position: Columnist

Ariel has been working as a highly professional computer-relevant technology editor at MiniTool for many years. She has a strong passion for researching all knowledge related to the computer’s disk, partition, and Windows OS. Up till now, she has finished thousands of articles covering a broad range of topics and helped lots of users fix various problems. She focuses on the fields of disk management, OS backup, and PDF editing and provides her readers with insightful and informative content.

When you wish to kill or stop a running process or any task in your Windows system, you mainly go to the Task Manager to get rid of the trouble. But did you know that there are other ways to kill a process in Windows? Well, here are the 10 ways to kill a process in Windows.

kill windows process

1. Using the Task Manager

Using the Task Manager is the simplest and first way of killing any process. You just have to follow it like this:

  • Press and hold “Ctrl + Alt + Delete” keys together, and it will show you some options from where you can click the Task Manager option.
  • Then select the “Processes” Tab.
  • Search for the process that you want to stop or kill, and then do any of the following.
  • Click on End task, or press the delete key from the keyboard, or right-click on the process, and click on End task.

Note: You can simply right-click on the taskbar (for Windows 10) and select the “Task Manager” option, as seen in the screenshot below:

windows 10 taskbar

2. Using Command Prompt

Users can kill a process from Command Prompt. The instructions are.

  • Open Command Prompt
  • Search “tasklist” in the CMD and press “Enter.” It will display all running processes.
  • Search for the process you want to kill or type its name like “taskkill /IM Process Name /F”

3. Kill a Process Using PowerShell

In this method, you can open PowerShell as Administrator.

  • Run PowerShell as administrator.
  • Type this command “Get-Process” that displays all running processes.
  • To kill a process, use this cmdlet “Stop-Process -Name “ProcessName” –Force.”

4. Ultimate Process Killer

Ultimate Process Killer is a computer speed-up program that displays all running processes and allows you to kill them in batches. This program is only 153KB in size and requires the following steps.

  • Simply run the program
  • Refresh the list
  • Tick the process boxes that you want to stop or kill
  • Click on the Kill Selected Process button

5. Multi-Process Killer

Multi-Process Killer is a simple tool for which Java Runtime Environment is required for it to work. The process is very simple.

  • Run the program and select required processes
  • Tick the box of only those processes which you want to kill
  • Then click on Kill Selected Processes to stop those processes
  • It will prompt confirmation and then kills those process

6. KillProcess

KillProcess is a different kind of program that makes use of predefined process lists. The Kill Lists are adjusted manually and can be loaded on your own. The running tasks in the list will be killed.

You need to follow these steps in order to create a list of batch killing processes.

  • Open File and then click New Kill List
  • Set a name and location for that file
  • Click the processes in the list and press the Insert key from the keyboard
  • Press the bottom left button on the app to execute that newly created list and kill the selected processes

7. Taskkill

To kill the tasks that are running as Administrator, you need Taskkill. Follow these steps.

  • Open the command prompt as Administrator.
  • Type tasklist in command prompt to display all running processes along with their PIDs by searching like, tasklist | more
  • To kill a process using its PID, you can use the command “taskkill /F /PID pid_number”, and for killing a process by its name, use this command “taskkill /IM “process name” /F.”

8. MiTec Task Manager Deluxe

MiTec Task Manager Deluxe is one of the easiest to perform batch process killing methods.

Like other programs, this tool also requires only to select the required processes that you want to kill. You just have to do this.

  • Select all the processes that you want to kill by ticking the boxes against each process
  • After you are done, click on the Terminate Checked Processes option

9. Auto Kill Any Process

Auto Kill Any Process has the ability to create lists like other programs discussed above to batch terminate any process. In this, the created list is called the Hitlist. To do this, follow these steps.

  • Go to the Add Running Processes tab, click on each process to be killed or stopped from a running list
  • Click on the option Save to Hitlist or press the Kill Now button
  • Users can create, edit and run custom Hitlists
  • There are also timer settings available that execute the selected Hitlist’s after each given time or period.

10. Kill Processes with Command-Line or Scripts

Windows has a built-in command-line tool that posses the ability to stop or kill any running process with the help of a script file or command prompt. The user just has to open the task list using commands and then run it to see which processes are running. Then he has the option to stop those processes which he wants to by using their PID numbers. These processes can also be stopped by using their name with the same command used for PID numbers.

Conclusion

You’ve now seen the 10 ways to kill a process in a Windows environment. I have discussed all the easy solutions, including third-party tools that can help you easily kill any unwanted running processes, including the ones that are supported by administrator rights. For more info or detail, leave a reply in the box below.

FAQ’s

How do you kill a PID process?

First, look for the process that you actually want to stop or kill. You can also look for its PID that can help you directly stop it. Run command prompt and search for the process by entering the PID, then stop the process.

How do I kill a process in Windows 10?

With the help of a task manager, you can easily kill any process in Windows 10.
1. Press “Ctrl + Alt + Delete” together from the keyboard to display a list of options from where you have to choose the Task Manager option.
2. Go to the “Processes” Tab.
3. Select only those processes that you want to kill and then press the delete key or End Task button that is given under it.

  • How to make taskbar smaller windows
  • How to set path on windows
  • How to run shell script in windows
  • How to remove recommended from start menu windows 11
  • How to open windows powershell