Search notes:

PowerShell Cmdlet: Stop-Process

stop-process stops (kills) the processes that match the given criteria.
stop-process -name excel
stop-process -id $pidOfProcess

$np = get-process -name notepad
stop-process -inputObject $np

Fining process id if multiple processes have the same name

At times, there are multiple processes with the same name, and only one of them needs to be killed. stop-process gimp* for example would kill every process that starts with gimp.
So, in order to find the «correct» process id, the following pipeline might help.
PS:\> get-process gimp* | select id, starttime
This pipeline prints a process id along with the time when a process has started which sometimes is an indication which process should be stopped.

Alias

kill is an alias for stop-process. (Compare with the equally named Linux shell command kill.

See also

Powershell command noun: process

Index