Stops a running process.
Snap-In: Microsoft.PowerShell.Management
Syntax:
Stop-Process
[-Id] <Int32[]> [-PassThru] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Stop-Process -Name <String[]>
[-PassThru] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Stop-Process
[-PassThru] -InputObject <Process[]> [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Description:
The stop-process Cmdlet shuts down a running process. To work, the cmdlet must have either a -ProcessName or -Id parameter, -Id is the default.
WARNING: Stop- process operates regardless of the process. For example, if you invoke stop-process on Microsoft Word, it will shut down the program and unsaved data will be lost.