Skip to main content

Command referenceStop-Process

Stop-Process command (Windows / PowerShell)

WindowsPowerShellprocessbeginner

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 / optionMeaning
-IdTarget exact process IDs.
-NameTarget processes by name.
-ForceStop a process without prompting where applicable.
-PassThruReturn process objects after requesting stop.
-WhatIfPreview 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.

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.