Wednesday, September 25, 2013

Powershell - Get Process and Kill Process - Automation

As part amateur programming, we end up queing a lot of processes in the taskbast and manually deleting them.

I was using eclipse and i realised that I had a lot of processes with the name iexplore.exe and console.exe. Even if I manually try to kill each one, I have a long way to go.

Automation is the key. Powershell is the solution I found that worked for me.

Steps to kill a process
Launch three or four internet explorer windows in the application.
Launch the command shell - Windows + R, In the run window, enter command as "powershell" without quotes.

In the Powershell use the following commands

get-process iexplore
kill -Name iexplore

- Name tells the shell to kill all the process "names" that have iexplore.
You can get a complete list of arguments by using
help get-process

MSDN link : http://technet.microsoft.com/library/hh849832.aspx

Regards,
Ajith Moni




No comments:

Post a Comment

Please add value. Sharing is caring