Search notes:

taskkill.exe

taskkill.exe can be used to terminate (kill) processes from within cmd.exe or PowerShell.

Specifying the image name

C:\> taskkill /im  foo.exe

Specify the PID (Process identifier)

The /pid option allows to kill a process by its process identifier.
C:\> taskkill /pid 5711
Process ids can be found with tasklist.exe.

Using /f to forcefully terminate a process

When trying to kill a process, the utility might print something like SUCCESS: Sent termination signal to the process with PID 4128. even though the process was not killed.
Therefore, in order to make sure a process is killed, the /f might be used to forcefully terminate a process:
C:\> taskkill /f /pid 5711

Using a filter on the process name

taskkill has a rudimentary filter function that can be applied with /fi which can be used to kill a process when I am not exactly sure what the name of the process is.
For example, if SQL Developer hangs, I might use
C:\> taskkill /fi "imagename eq sqldeveloper*"
SUCCESS: Sent termination signal to the process with PID 33220.
The /fi option is also present in tasklist.exe.

See also

tasklist.exe, tskill.exe
The PowerShell cmdLet stop-process.
The Linux shell command kill.
cmd.exe: Built-in commands

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1760385534, '216.73.216.88', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/dirs/Windows/System32/taskkill_exe(82): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78