The Stop-Process
cmdlet in PowerShell is used to stop one or more running processes. It allows users to terminate processes based on their process ID (PID) or name.
Here’s how to use Stop-Process
:
- Open PowerShell by searching for it in the Start menu or by pressing Win + X and selecting “Windows PowerShell” or “Windows PowerShell (Admin)”.
- Once PowerShell is open, you can use the
Stop-Process
cmdlet followed by the PID or name of the process you want to stop. For example:
- To stop a process by its PID:
Stop-Process -Id 1234
- To stop a process by its name:
Stop-Process -Name "notepad"
- After executing the
Stop-Process
cmdlet with the desired parameters, PowerShell will terminate the specified process.
Source for More Information
Here’s a source where you can find more detailed information about Stop-Process
and other PowerShell cmdlets:
- Microsoft Docs: Stop-Process cmdlet
The Microsoft Docs page provides comprehensive documentation on PowerShell cmdlets, including Stop-Process
, with detailed explanations, examples, and usage scenarios.