Stop-Process

noun

say it: “STOP PROH-ses” /ˈstɑp ˈprɑsɛs/

A PowerShell command that ends a running program at once, chosen by its process ID or its name, without giving it a chance to save.

What does Stop-Process do?

Stop-Process ends a running program from outside, like pulling its plug: it gets no chance to save anything. Name the one process by its Id, rehearse with -WhatIf, and use -Name only when that name belongs to one program alone, because it stops every process with that name.

Stop-Process -Id 83740 -WhatIf
# What if: Performing the operation "Stop-Process" on target "pwsh (83740)".
Stop-Process -Id 83740

In a sentence

  • “Sam rehearsed Stop-Process with -WhatIf before stopping the runaway for real.”
  • “Stop-Process -Name pwsh would close every PowerShell window, so Sam used the Id.”

Level: Apprentice · More PowerShell terms at this level

Updated