End the hung task or program with a command

We have already described in detail in the past how you can use the Windows Task Manager or have an overview of all active Windows tasks displayed by command . Today we would like to deal with the problem of ending a specific task with a command. This is often useful if the task manager cannot finish the desired task.

End task with task kill

To end a certain process or a hanging program with a command, you must first open an MS-DOS command prompt as administrator. Then you should use the ” Tasklist ” to display the PID if necessary . The PID is the process ID and identifies each running task with a unique ID number. Per Taskkill You can then, for example a finish specific task with the PID . The command required for this is:

TASKKILL / PID NUMBER / F

The “/ F” parameter forces the active task to be ended. If there are other, subordinate processes for this task and you would like to end them as well, then you have to add the parameter “/ T” to the task.

You can get help on the Taskkill command via

TASKKILL /?

Below we have shown you all possible task kill parameters.

taskkill

If you want to close certain programs such as the Google Chrome browser, you can do this using the following command.

TASKKILL / IM CHROME.EXE / F

This looks like this:

taskkill process name

If you want to end the tasks of an entire PID area , this is also possible. You can either display the PID number individually,

TASKKILL / PID 1230 / PID 1240 / PID 1250 / T

or set the parameters so that all tasks with a PID number that are greater than the specified PID number are ended. Then the command is as follows.

TASKKILL / F / FI “PID GE 1000”

You can find more information on helpful Windows commands in these articles:

– Increase Windows 10 Uninstall period of 10 days
– Ping, IPConfig and Tracert as PowerShell commands
– Read WindowsUpdate.log on Windows 10 or reformat using PowerShell – Install
Windows roles and features with
PowerShell
– Read out computer system information with PowerShell – With WINRM Prepare the Windows client for remote PowerShell commands
– Edit local users and groups with
PowerShell
– Determine Windows system runtime with PowerShell – Create Windows 10 system restore point with PowerShell

Shut down and restart Windows with PowerShell commands – Repair Windows component stores with DISM and PowerShell Commands
– Switch off UAC (user account control) via PowerShell or registry in Windows 10
– PowerShell command to deactivate the firewall

administrator