Command prompt can be used to stop multiple processes also.
Using the Taskkill command line tool and providing the PID
or process ID.
See this article on how to do it via command line, which can
be done via batch file.
PowerShell has cool ways, of killing or stopping
processes.
Cool ways, because killing, stopping or terminate a process
can be done in different ways.
This code below will stop a process using the
"Description" parameter.
As long as the Description is known, provide the description
to PowerShell and it will terminate or kill the process for the particular
description specified.
This basically means, if there are two or more instances for
the particular description everything will be closed or processes will be
killed.
Code below will close all Notepad that is running.
Get-Process |
Where-Object {
$_.Description -eq "Notepad" } | Stop-Process
Code below will close all Excel workbooks that are open.
Get-Process |
Where-Object {
$_.Description -eq "Micrsoft Excel" } | Stop-Process
To check the Description for all processes on the system use
this code below:
Get-Process | Select Description
Another way to stop processes is by Company Name.
See example below:
Get-Process |
Where-Object {
$_.Description -eq "Microsoft Corporation" } | Stop-Process
Code above will terminate processes that runs under
"Microsoft Corporation".
To stop all Firefox browsers, run this code below:
Get-Process |
Where-Object {
$_.Description -eq "Mozilla Corporation" } | Stop-Process
Run this code to check processes under Company name:
Get-Process | Select Company
Names can also be used to stop processes, see code below:
#will stop mysql process
Get-Process |
Where-Object {
$_.Name -eq "mysqld" } | Stop-Process
#will stop all excel process
Get-Process |
Where-Object {
$_.Name -eq "EXCEL" } | Stop-Processs
#will stop all Microsoft word process
Get-Process |
Where-Object {
$_.Name -eq "WINWORD" } | Stop-Process
#will stop all paint.net process
Get-Process |
Where-Object {
$_.Name -eq "PaintDotNet" } | Stop-Process
Use code below to check the names of the current running
processes:
Get-Process | Select Name
That's it guys. Hope it helps.. Till next time..
----------------------------------
Free Android app, download at Google play:
Android Divine Mercy Chaplet Guide
https://play.google.com/store/apps/details?id=com.dmercyapp
----------------------------------
Free Android app, download at Google play:
Android Divine Mercy Chaplet Guide
https://play.google.com/store/apps/details?id=com.dmercyapp
Comments
Post a Comment