Commands / System

Stop-Process

Stop a process

beginner System Aliases sppskill

Stop-Process
 Stop-Process -Name notepad -WhatIf
Works on
WindowsLinuxmacOS
PowerShell
5.1 and later
Reference
Microsoft Learn: Stop-Process

Careful: Killing the wrong process can lose work. Filter carefully. Use -WhatIf.

Stops processes. Prefer -Id when more than one process shares a name. -Force skips confirmation in some hosts.

Try this

Get-Process -Name notepad -ErrorAction SilentlyContinue | Stop-Process -WhatIf

Coming from another shell

ShellWhat you might type
bash / zshkill 1234
cmd.exetaskkill /PID 1234

More in From bash and From cmd.

Related commands