taskkill command code example

Example 1: taskkill in cmd

taskkill /f /im notepad.exe /t
taskkill /f /im chrome.exe /t

Example 2: script to kill a process in windows

taskkill /PID 1234

Example 3: taskkill cmd

taskkill /f /im Process_name.exe

Example 4: kill process from pid

kill SIGNAL PID

#Example
kill -9 3827

#See more information from : https://www.linux.com/training-tutorials/how-kill-process-command-line/

Example 5: cmd taskkill

@echo off

:: ganti browser.exe dengan nama target yang mau di kill
:: buka taskmanager pilih -> details -> kemudian ambil namanya
:: jika ingin multiple taskkill process tambahkan hal yang sama seperti fungsi sebelumnya dibawahnya

taskkill /FI "PID gt 1000" /FI "IMAGENAME eq browser.exe" /F /T
cls
taskkill /FI "PID gt 1000" /FI "IMAGENAME eq code.exe" /F /T
cls
taskkill /FI "PID gt 1000" /FI "IMAGENAME eq spotify.exe" /F /T
cls
taskkill /FI "PID gt 1000" /FI "IMAGENAME eq chrome.exe" /F /T
cls

exit

Example 6: kill process in win by pid

kill process by pid