
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Stop Specific Instance of a Process in PowerShell
To stop the specific instance of the process, Process ID needs to provide to Stop-Process cmdlet.
Example
In the below example, we need to stop Notepad process with instance ID 25400.
Output
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName ------- ------ ----- ----- ------ -- -- ----------- 228 14 3156 13680 0.13 4900 1 notepad 232 14 3196 13752 0.16 25400 1 notepad
Stop-Process -Id 25400
Now, when Get-Process command is run, there will be no process running with –Id 25400.
Command
PS C:\WINDOWS\system32> Get-Process -Name notepad
Output
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName ------- ------ ----- ----- ------ -- -- ----------- 227 13 2808 13492 0.14 4900 1 notepad
Advertisements