Skip to Content

Stop-Process


Description
Stops one or more running processes.
Syntax
Stop-Process [-Name] <String[]> [-Id <Int32[]>] [-InputObject <Process[]>] [-PassThru] [-Force] [-WhatIf] [-Confirm] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Example
Stop-Process -Name 'notepad'
Parameters
Name: Required. Specifies the process names
Id: Optional. Specifies the process IDs
InputObject: Optional. Specifies the process objects
PassThru: Optional. Returns the process objects
Force: Optional. Forces the command to stop the processes
WhatIf: Optional. Shows what would happen if the command runs
Confirm: Optional. Prompts for confirmation before running the command
Return type
None
Aliases
spps
Supported Windows versions
Windows PowerShell 2.0 and laterWindows 7Windows 8Windows 10Windows 11Windows Server 2008 R2 and later