I think taskkill is what you're looking for. With it you can kill a running process by its ID or image name (name of the .exe file).

You can read a detailed usage explanation on this page: http://www.computerhope.com/taskkill.htm

Answer from Sledge Hammer on Stack Overflow
🌐
Stack Overflow
stackoverflow.com › questions › 72215991 › how-to-kill-a-background-process-in-windows-and-keep-foreground-process-running
How to kill a background process in windows and keep foreground process running - Stack Overflow
The first and last process has to be killed, the second one should keep running. I tried to filter by service, but failed: taskkill /IM BPNEXT.EXE /FI "services eq Services" /T /F ... Thanks for the hint. I tried to get the desired line by using: @ECHO OFF setlocal enabledelayedexpansion FOR /f "tokens=*" %%G IN ('tasklist /FO "CSV" ^| findstr /I BPNEXT.EXE ^| findstr Services') DO ( echo %%G ) It worked so far.
Discussions

What is the shortcut command to kill a process in a Windows command window? - Stack Overflow
I have a process in a Windows command window which cannot be killed. I tried taskkill and all the shortcuts in the post Linux-like Ctrl + C (keyboard interrupt) for the Windows command line More on stackoverflow.com
🌐 stackoverflow.com
Nodejs keeps running on the background and I can't stop it
Would need more details but I’d love to help. Running ..... pkill node ....In your terminal application should kill all node processes More on reddit.com
🌐 r/node
17
7
May 1, 2020
Is WSL2 always running in the background?
If you close all instances (terminal ecc), normally the process (vmem if I remember well) close itself after a while in idle. If not you can force it with —shutdown parameter (wsl —shutdown. Check it I’m on mobile now) More on reddit.com
🌐 r/bashonubuntuonwindows
10
10
September 16, 2020
How to run a process in the background?

I think you're a bit misled, Command by default spawns programs in the background. What blocks (holds up your program) is the wait function. The wait function's purpose is to hold up your program until the child process is done. If you're running a command in the background, try simply not calling wait.

More on reddit.com
🌐 r/rust
21
9
March 23, 2015
🌐
YouTube
youtube.com › watch
How to kill Process in windows 10 ( 2025 ) | How to kill background process in windows 10? - YouTube
We explained how to kill process in windows 10 & methods to kill process in windows 10 command line / how to kill background process in windows 10.Topic Addr...
Published   March 9, 2022
Views   2K
🌐
Auslogics
auslogics.com › tech wisdom blog › optimization › pc performance › terminator 101: how to kill all the processes in windows 10/11? automated fix included.
Terminator 101: How to Kill All the Processes in Windows 10/11? Automated Fix Included. — Auslogics Blog
March 21, 2025 - How about if you want to end specific processes, programs, or apps in Windows 10? ... To end all background processes, go to Settings, Privacy, and then Background Apps. Turn off the Let apps run in the background. To end all Google Chrome processes, go to Settings and then show Advanced Settings. Kill all related processes by unchecking Continue running background apps when Google Chrome is closed. To end all Internet Explorer processes, use the Command Prompt as an administrator.
🌐
The Windows Club
thewindowsclub.com › the windows club › how to kill a process using command line in windows 11
How to kill a Process using Command Line in Windows 11
You can open the Task Manager, find the process, and click the End task button. Alternatively, you can use the Taskkill /IM “process name” /F command to stop any process using Command Prompt.
Published   June 9, 2024
🌐
M3 Data Recovery
m3datarecovery.com › home › how to tips › kill stubborn processes on windows 7/8/10/11 with confidence
Kill Stubborn Processes on Windows 7/8/10/11 with Confidence
Or to kill by image name (like notepad.exe) and running the following command:taskkill /IM notepad.exe /F · The /F flag forces termination of the process. Note: This method works the same across all versions including Windows 7/8/10/11. The command-line interface remains consistent.
🌐
Itechtics
itechtics.com › microsoft › windows › windows 11 › how to kill process from windows command line
How To Kill Process From Windows Command Line
May 21, 2024 - 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.
Find elsewhere
🌐
Windows Report
windowsreport.com › how to › kill all processes on windows: 4 ways to stop all processes
Kill all Processes on Windows: 4 Ways to Stop All Processes
October 4, 2023 - Using Task Manager – This is the most common method for killing a process on Windows. You make use of the utility’s End task feature. Employing Command Prompt – You can also use the Command Prompt to kill a process using specific scripts.
🌐
Groovy Post
groovypost.com › how-to › end processes like a pro with the taskkill command
End Processes like a Pro with the Taskkill Command
August 13, 2021 - What you might not know is that ... in Windows 10: the taskkill command. The advanced task kill command gives you more control as you end processes and even works on tasks that refuse to close even after killing them in Task Manager. Oh, and we’ll be running this from the command line, so get your fingers ready. Some programs and background services in ...
🌐
EaseUS
easeus.com › knowledge center › how to kill all the processes in windows 10/11
How to Kill All the Processes in Windows 10/11 - EaseUS
June 30, 2025 - In general, there are two ways to kill the process. The first one is to restart the system, which will fix any troubling bugs. Though this is the simplest solution out there, we have listed five more in this article to help you out. In Windows, the Task Manager is a built-in tool for managing and controlling processes. It's pretty easy to close background processes using the Task Manager.
🌐
NinjaOne
ninjaone.com › home › blog › it ops › how to kill a process in windows: 4 methods
How to Kill a Process in Windows | NinjaOne
April 30, 2025 - If you have a process’s PID, kill the task with the command: “taskkill /F /PID pid_number” replacing pid_number with the actual PID of the process you want to terminate. To end a process by its name, use the command: “taskkill /IM process ...
🌐
Windows Command Line
windows-commandline.com › taskkill-kill-process
TaskKill: Kill process from command line (CMD)
December 4, 2022 - 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.
🌐
WinBuzzer
winbuzzer.com › home › how to identify and kill any process in windows 11 and windows 10
How to Identify and Kill Any Process in Windows 11 and Windows 10
November 7, 2024 - Press the Windows key and type ... much like Task Manager, by typing tasklist | more and pressing “Enter” ... Type taskkill /F /PID x, where x is replaced by your process’ PID....
🌐
Coding Lap
codinglap.com › home › how to kill a process from windows command line (cmd or powershell)
How to Kill a Process From Windows Command Line (CMD or PowerShell) - Coding Lap
April 4, 2025 - Developers, IT admins, and even regular users rely on this method to stop frozen apps, terminate scripts gone rogue, or end background tools that keep consuming CPU or memory. The Taskkill command is built into Windows and provides a fast way to end processes directly through the command line.
🌐
Tweaks
tweaks.com › windows › 39559 › kill-processes-from-command-prompt
Kill Processes from Command Prompt
If you have multiple instances of an image open such as multiple firefox.exe processes, running the taskkill /IM firefox.exe command will kill all instances. When you specify the PID only the specific instance of firefox will be terminated.
🌐
Marc Nuri
blog.marcnuri.com › home › windows: how to kill a process from the command line
Windows: How to kill a process from the command line - Marc Nuri
October 31, 2023 - In this post, I've shown you the possible ways to kill a process from the command line in Windows. Using the taskkill command from cmd or the Stop-Process cmdlet from powershell.
🌐
Gearspace
gearspace.com › home › the forums › music computers › windows 10 - how to kill background processes and save it
Windows 10 - How to kill background processes and save it - Gearspace
January 22, 2017 - Is there a Windows 10 program for that ? I believe that the Task manager allows us to stop processes & services, one by one, but I have to do this each and every single time ?....noooooooooooooo...help. ... If you know the names of the services, you can create .bat files to stop/start a bunch of services. (for a list of currently active services: type "net start" in command prompt) Create a "stopservices.bat" in notepad and save on a location you can remember, contents: net stop "Service Name 1" net stop "Service Name 2" net stop "Service Name 3" pause (add pause as last command to see what happened, otherwise the window will disappear after running) When you want to stop services: rightclick the .bat - run as administrator (necessary to start/stop services) To start them again: create the opposite (net start ...)
🌐
Winaero
winaero.com › home › windows 10 › how to kill a process in windows 10
How to Kill a Process in Windows 10
January 16, 2018 - 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. ... 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. Note: To kill a process which runs elevated, you need to open PowerShell as Administrator.
🌐
Windows 10 Forums
tenforums.com › tutorials › 101472-kill-process-windows-10-a.html
Kill a Process in Windows 10 - Windows 10 Help Forums
January 1, 2018 - OneDrive.exe /F If you would like to kill multiple processes at once in one command line, then you would just add an additional /IM