How to kill process windows
How to kill process windows
TaskKill: Kill process from command line (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.
Example:
Kill all processes running mspaint.exe:
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.
/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
The above command would make all GUI windows disappear. You can restart explorer by running ‘explorer’ from cmd.
Not using /F option, would send a terminate signal. In Windows 7, this throws up a shutdown dialog to the user.
Kill a process with process id:
We can use below command to kill a process using process id(pid).
Example:
Kill a process with pid 1234.
Kill processes consuming high amount of memory
For example, to kill processes consuming more than 100 MB memory, we can run the below command
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
Kill Chromedirver from command line
To kill firefox browser application
To kill MS Word application(Don’t do this if you haven’t saved your work)
Sometimes, the command window itself might not be responding. You can open a new command window and kill all the command windows
This even kills the current command window from which you have triggered the command.
i have a question about this.
I have a process that runs in my domain that puts outlook suspended. As soon as I do a task kill forced as administrator it runs.
I wrote a little script, now i want to add admin rights to the script via GPO.
How to Kill a Process in Windows 10
Soon it will be sleeping with the fishes
Whether you’re dealing with a slow computer or just noticed a bunch of bloatware hogging all resources, killing the offending processes in Windows is the best method to deal with the problem.
Not only does this boost the performance of your PC, but it can also help stave off spyware and viruses. And before you ask: no, it’s not hard to kill a process in Windows 10. We’ll go over all the different ways you can do this safely and easily.
Why Kill a Process in Windows 10?
Each running application in Windows is composed of one or more “processes.” These processes are responsible for writing things to memory, reacting to user input, and performing all the actual work behind a computer program.
The thing is, not all processes are represented by an active window on your desktop. Windows system processes, for example, run quietly in the background without any explicit permission from the user.
And this is where the problem arises. Many unwanted applications like viruses or bloatware also run as hidden processes in the background, consuming resources and slowing down your computer. You can safely shut down even some Windows processes without impacting your computer.
Killing Unnecessary Processes With the Task Manager
The Windows Task Manager is the default tool for managing programs and processes on your computer. You can use it to view, analyze, or even terminate running applications and processes.
Its only drawback is its limited permissions. The Task Manager cannot kill protected processes (including system tasks and some viruses). In addition, it can be tedious to manually select and terminate all the target processes each time you run your computer.
Using Command Prompt to Kill a Process in Windows
If you prefer command-line tools, then you can kill a process using CMD too. The Command Prompt gives access to many useful utilities, including one called Taskkill.
As the name suggests, you can use Taskkill to kill any running task or process. If you run CMD as an administrator, you can even kill protected tasks.
It may seem counter-intuitive to use a command-line tool when the Task Manager can do the same without any need for typed commands. This is because we have only touched upon the most basic way to use Taskkill. There are many other ways to filter the processes without having to look through them manually.
PowerShell
CMD is not the only method to kill Windows processes with typed commands. Powershell is Windows’ built-in scripting language that offers many similar capabilities. In a way, Powershell is just a more verbose form of the Command Prompt.
The power of Powershell comes from its ability to create scripts of commands, which Windows can execute at leisure. This allows you to automate complex tasks on Windows.
If PowerShell seems underwhelming to you, it’s because we are using it like cmd. PowerShell is meant to create autonomous scripts that perform complex tasks independently, without any real-time feedback or input. While you can use it this way, the Command Prompt is frankly better at it.
Using KillProcess
So far, we have looked at tools and utilities present in your computer by default. While these certainly can get the job done, they lack some useful features present in third-party tools.
KillProcess is one such advanced task managing program. In addition to its ability to kill protected system processes, it also allows for creating a “Kill List”. Processes added to this list are automatically killed as soon as they enter active memory. This can be a great method to permanently shut down pesky bloatware.
The best thing about this approach is that you don’t have to kill each process one by one. This Kill List remains saved even after you exit the program, so you only need to run KillProcess itself to terminate all unwanted processes at once.
Many Ways to Kill a Process in Windows 10
There are multiple ways to kill a process in Windows 10. The most straightforward method is to use the Task Manager. It allows you to view and terminate processes in an easy-to-understand GUI format.
In case the Task Manager cannot kill the process, you need to use something more powerful. You can either try a third-party tool like KillProcess or use command-line tools to kill the protected process.
To permanently shut down unnecessary background processes, prevent them from starting up automatically, or add them to KillProcess’ kill list.
Levin Roy is a software engineer who loves writing about technology. Whether it is Windows tips-and-tricks or in-depth guides about application development, Levin uses his practical experience and technical skills to create articles that can help solve tricky problems. Read Levin’s Full Bio
How to kill a Process using Command Line in Windows 11/10
Windows 11/10 offers Task Manager not only to understand which program or application is taking how much of the resource, but it allows you to terminate or kill apps that stop responding. If there is one process that is causing the problem, you can easily manage them.
In the case of multiple processes taking a lot of CPU resources, Task Manager is cumbersome to use. So, in this post, we will learn how to kill one or multiple processes using the Command Prompt or PowerShell.
Kill a Process using Command Line
Using Command Prompt
Open Command Prompt with admin privileges by typing cmd in the Run prompt (Win + R) followed by pressing Shift + Enter.
To view the processes, type the following and hit Enter:
Note the process ID listed under the Process ID column.
You can also kill a program using the exact name.
To kill a process by its name, type the command:
So for Chrome, the program will have a name as chrome.exe.
Type and press Enter the following to kill Chrome.
The /F switch is used to kill the process forcefully.
To kill a process by its PID, type the command:
Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces.
For each process, you will have to add /PID option, and then execute it.
That said, here is one thing you should know. These days an application spans itself into smaller programs, and each of them has a different process id. Taking an example of Chrome, it has a PID for the extension, one for subroutines, and so on. Finding the primary process i.e., parent program ID is not easy, and so if you want to kill an application, it is best to use process namer to kill it.
Kill process using PowerShell
To see the list of running processes, execute the following command in an elevated PowerShell prompt:
To kill a process using its name, execute the following command:
To kill a process using its PID, execute the following command:
There are many alternatives to Task Manager if it is not available. Programs such as Process Explorer from Microsoft is an excellent add-on which offers more details about the process, and even allow you to kill multiple applications in one go. However, Taskview, Taskkill or Stop-Process, can be used to kill applications on remote computers as well, which is not possible for all third-party programs.
I hope the post was easy to follow.
Date: September 1, 2020 Tags: CMD, PowerShell
Related Posts
Terminal vs PowerShell vs Command Prompt difference explained
How to run CMD command on startup automatically in Windows 11/10
Command-line switches to deploy Microsoft software Update packages
[email protected]
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.
Primary Sidebar
report this ad
How to Identify and Kill Any Process in Windows 10
We show you how to kill a process in Windows 10 with Task Manager, Command Prompt’s taskkill, PowerShell, and third-party tools.
For the most part, Windows 10 programs function just fine, but when one misbehaves it’s often necessary to kill its process. At times, apps can refuse to close, get stuck on a blank screen, or suddenly consume a lot of system resources. Terminating the task will force it to close and free up your system for normal functioning.
Identifying and killing a process of single windows and background apps
There are various ways to kill a process, but all of them make use of an application’s PID (Process ID), a unique identifier that ensures only the correct one is terminated. However, it’s worth noting that terminating a specific application process can still have knock-on effects on the rest of the program’s functions if they rely on it.
The most common way in Windows to terminate a process is through Task Manager. But today we’ll also be covering how to kill a process with PowerShell, how use the taskkill command in Command Prompt, how to find a process ID with Process Explorer (Microsofts ooptional advanced Task Manager) and using a two-click-method via a task bar button.
Different methods to kill a process for different needs
Some programs run several processes at once which means if you want to terminate the application completely you will have to kill all those processes. And there are cases where you will have a program window or system dialog but cannot identify the underlying process. In our tutorial you will find solutions for all of those issues.
How to Kill a Process in Windows 10 with Task Manager
Task Manager is the bread and butter of Windows 10 task killers, providing a simple interface with all the information users need to make informed decisions about which applications they should close. Accessing it is as easy as pressing “Ctrl + Shift + Esc”.
After opening Task Manager with “Ctrl + Shift + Esc”, press the “More details” button in the bottom left to view more information.
You can also press the “Delete” key instead to save some time.
Click the “Details” tab, find your process, and click “End Task” or press “Delete”.
How to Kill a Process with the Taskkill Command
If task manager isn’t an option because you’re using a Windows server install or it’s blocked by your administrator, you can achieve similar results through the use of the taskkill command in Command Prompt.
Press the Windows key and type “Command Prompt”, then choose “Run as administrator”.
You can get a quick readout of all the currently running processes, much like Task Manager, by typing tasklist | more and pressing “Enter”
taskkill /IM «yourprocess.exe» /F
How to Terminate a Process with PowerShell
Alternatively, those familiar with PowerShell can use it kill tasks instead. This has the advantage of quite intuitive commands.
Press “Windows + X” to open the fly-out menu, then click “Windows PowerShell (Administrator)”.
In PowerShell, type Get-Process to have it return a list of all of the currently running processes on your PC and their PID.
To stop the process, type the following, substituting the x for the relevant PID:
How to Identify the Process of any Open System Dialog or Program Window with Process Explorer
As you’ve likely realized by now, scrolling through a giant list to get the name or PID of an application can be an annoyance. To remedy this, you can use Microsoft’s Process Explorer.
Head to Microsoft’s Process Explorer documentation and press the “Download Process Explorer” button to download the application.
Head to the folder you downloaded the application to and double-click “Procexp64.exe” or “proxexp.exe” depending on whether your system is 64 or 32-bit.
You can use Process Explorer much like Task manager by clicking the application and pressing the ‘x’ button in the top toolbar to stop it.
Alternatively, if you don’t know the name of the application or its process, click the target button in the top toolbar.
The process will then be automatically selected in the list and you can stop it as normal.
How to Kill Any Window-related Process Directly with just Two Clicks
Though all of the above methods work just fine, if you find yourself having to kill tasks regularly they still aren’t ideal. For such use cases, we recommend Grizzly Bear’s “Kill”, a tiny 205KB app that you can pin to your taskbar to kill window process with two clicks.
Go to the dcmembers site and download the Kill.exe freeware by pressing the big blue “Download” button.
In the kill folder, right-click “Kill.exe” and select “Pin to taskbar”.
To kill a process, simply click the button on your taskbar and then click on the application window.
If you found this tutorial helpful, you may also be interested in our guides about changing process affinity and OneDrive syncing any directory via mklink.
How to Kill a Process in Windows 10
When you start an app, the operating system creates a process for an executable file of the app. It contains the program code and its current activity. Windows assigns a special number known as Process Identifier (PID) which is unique for every process. There are a number of reasons you might want to kill a process, and different methods you can use to terminate it. Here is how it can be done.
To kill a process in Windows 10, do the following.
This is Task Manager’s most well known method.
Note: The same can be done from the Details tab. It is a special tab which lists process names instead of app names. There you can select a process in the list and either click on the End process button or hit the Del key.
Using the End Task button means Windows first tries to see for a certain timeout if the process has really stopped responding, and attempts to collect a crash or memory dump of the process. It then terminates the app.
Tip: We highly recommend you read the article How to end a process quickly with Task Manager in Windows 10 to learn all Task Manager tricks. Also, you can get the classic Task Manager app in Windows 10 to end processes or tasks.
Another classic method to close a process is the console tool taskill. It comes bundled with modern versions of Windows.
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.
For example, to kill a process by its PID:
To kill a process by its name:
Kill a process using PowerShell
Note: To kill a process which runs elevated, you need to open PowerShell as Administrator.
Examples:
This command will close the notepad.exe process.
The next command will close a process with PID 2137.
If you need to kill a Store app, see the following article:
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!
Author: Sergey Tkachenko
Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube. View all posts by Sergey Tkachenko
10 thoughts on “How to Kill a Process in Windows 10”
Some good ways to kill a process, but you forgot Process Explorer, I have been using it since Microsoft bought his company. And have replaced Task Manager with it. Thanks for you description on killing a process with power shell….janek
Well, i’ve tried to cover native methods. Sure, there are tons of extra ways to kill a process.
Is there a way to have tasklist output sorted alphabetically? It truly is a long list.
Thank You
Try
TASKLIST /NH | SORT
tip: does not need to type anything in uppercase 😉
Thank you for this information. I was trying to remote in to work but my outlook was stuck/frozen and could not access anything but command. The taskkill information saved me a long commute in to work.
Thank you for your information on how to kill a Windows process.
Could you possibly advise how to “restart” a process stopped by using taskkill in the command line?
For example, how can taskhostw.exe be restarted in the command line after the using the command “taskkill /F /IM taskhostw.exe” in the command line?
It depends on the process.
If it is a service, you should issue the appropriate command for the service.
If it is a regular executable, you need to start it by typing its executable name and its arguments, if they needed.
Also, there is a start command in the command prompt. Run start /? to see what it can do for you.