Search notes:

kil.ps1

kil.ps1 is a PowerShell script to kill processes by their name. It might be called like so:
PS C:\> kil excel
The script can be given the -restart (or -r) argument to restart the process. If multiple processes were killed, only one process is restarted:
PS C:\> kil -r outlook

Source code

#
#   This script is called kil because kill is a default
#   alias for stop-process.
#

param (
  [switch] $restart
)

set-strictMode -version latest

if ( $args.count -lt 1 ) {
   write-host 'kil procName'
   return
}

$procName = $args[0]

# write-host $procName

$procs = get-process $procName -ea silentlyContinue

if ($procs -eq $null) {
   write-host 'no processes found'
   return
}

foreach ($proc in $procs) {
   write-host "Killing $proc"
   $procPath = $proc.path
   stop-process $proc
}

if ($restart) {
   start-process $procPath
}
Github repository scripts-and-utilities, path: /kil.ps1

See also

kill-procs.pl is a similar Perl script.
Terminating Windows processes.
Scripts

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/developm...', 1759374680, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/tools/scripts/personal/kil_ps1(89): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78