killing tasks (processes) in Windows command prompt
You can kill any process by it’s name or process id.
Killing process by pid (process id)
taskkill -pid <process-id>
For example – To kill the process with id 286, you can use below command.
taskkill -pid 286
Killing process by process name
You can use below syntax to kill process by name. here -im means image name and -f means kill forcibly. Note that it will kill all processes with given name
taskkill -f -im <process-name>
For example – If you want to kill firefox.exe process, you can use below command.
taskkill -f -im “firefox.exe”
If you want to kill child processes as well, you can use below syntax.
taskkill -f -t -im <process-name>