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 namesId: Optional. Specifies the process IDsInputObject: Optional. Specifies the process objectsPassThru: Optional. Returns the process objectsForce: Optional. Forces the command to stop the processesWhatIf: Optional. Shows what would happen if the command runsConfirm: 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