Command referenceStop-Process
Stop-Process command (Windows / PowerShell)
What it does
Stop one or more local processes by name, ID, or pipeline input. Guides covering the stop-process powershell usually need pipeline-friendly examples, common parameters, and how the cmdlet compares with classic CMD or Linux tools. This page includes syntax, options, and copyable PowerShell examples.
Stop one or more local processes by name, ID, or pipeline input.
Syntax
Stop-Process [-Id] <Int32[]> [-Force] [-PassThru] [-WhatIf] [-Confirm] | Stop-Process -Name <String[]>
Common options
| Flag / option | Meaning |
|---|---|
| -Id | Target exact process IDs. |
| -Name | Target processes by name. |
| -Force | Stop a process without prompting where applicable. |
| -PassThru | Return process objects after requesting stop. |
| -WhatIf | Preview selected processes. |
Practical examples
Stop by ID
Stop-Process -Id 4242
Stops one exact process.
Preview by name
Stop-Process -Name notepad -WhatIf
Shows matching processes without stopping them.
Pipeline stop
Get-Process -Name demo* | Stop-Process -Confirm
Confirms each matching process from the pipeline.
Linux ↔ Windows equivalent
Closest match: kill (Linux / bash / sh / zsh). Send a signal to one or more processes.
Common mistakes
- Using a common process name and terminating unrelated instances.
- Forcing termination before allowing applications to save and clean up.
Related commands
- Get-ProcessRetrieve local or remote process objects and resource metrics.
- taskkillEnd processes by process ID or executable image name.
- killSend a signal to one or more processes.
- psDisplay a snapshot of running processes.
- tasklistList local or remote running processes with selectable fields and filters.
- topMonitor processes and system resource use in real time.
FAQ
What does Stop-Process do in PowerShell?
Stop one or more local processes by name, ID, or pipeline input.
How can I see examples for Stop-Process?
Run `Get-Help Stop-Process -Examples`, then adapt an example to the provider and objects you are using.
What is a practical Stop-Process example?
Try `Stop-Process -Id 4242` — Stops one exact process.
Does Stop-Process return text or objects?
Stop-Process normally participates in PowerShell's object pipeline; formatting seen in the console is a view of those objects.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.