Windows 10: kill a command line process

Linux users are used to using the command line to perform system operations. Whether to make a OS update, configure an internet proxy or do the cleaning in the kernels, the Terminal of a Linux distribution is regularly used. Under Windows, the vast majority of actions related to the operating system are done through the graphical interface, using the mouse in the Settings menus. Windows 10 Where Windows Server, via the Task Manager or the various management consoles. Some people know and use PowerShell, but the old Command Prompt hasn’t had its last word on performing maintenance or troubleshooting a stuck situation.

This tutorial explains how kill a process, kill a task, on Windows 10, using Command Prompt (cmd) and PowerShell. Several methods to achieve the same result, kill a process of Windows or of a third party software, which is blocked or which has crashed. A brutal but effective way to recover resources on an overloaded computer or after a software crash.

Kill a process with Command Prompt (cmd)

1. Open a Command Prompt (cmd.exe).

2. Type ” tasklist To display a list of all the processes running on the operating system. A “PID” column (Process IDentification) is useful for the following.

Windows 10 cmd tasklist tutorial

3. To kill a process by its PID identifier: recommended to only kill a specific process when there are several with the same name.

taskkill /f /pid 1234

Windows 10 tutorial cmd taskkill pid id

4. To kill a task by name:

taskkill /im "processus.exe" /f

Windows 10 tutorial cmd taskkill name

Here, killer Teams.exe closes all the processes related to the program Microsoft Teams.

5. The process or processes have been killed, so the operating system can be unlocked or we can restart the program which had crashed.

Kill a process with Windows PowerShell

1. Open a console PowerShell. If necessary, open it as Administrator.

2. Display the list of active processes with:


Windows 10 PowerShell tutorial get process list process

3. Use the following command to kill a process by its ID:

Stop-Process -ID 1234 -Force

Windows 10 PowerShell stop process id pid tutorial

4. Use this command to kill all processes used by a program:

Stop-Process -Name "processus.exe" -Force

Windows 10 PowerShell stop process name tutorial

5. Note that PowerShell, unlike cmd, does not return positive results. Only errors are reported and displayed in red on the screen:

Windows 10 PowerShell stop process error tutorial