Powershell is worth a look if you haven’t used it before.
It is Microsoft’s new command line that operates in an object-oriented way.
There are still Unix commands that I think work better (like Tail, but we won’t go there yet).
Today’s tip is about getting a list of processes that are running.
For folks who have used Unix, this is similar to the PS command. For purely Windows folks, this is like the process list in Task Manager.
This is a quick-tip, so I won’t belabor the point:
Get-Process
That’s it. You will get a listing of processes that are running and info about how much CPU and memory they are consuming.
Want to see see just instances of Internet Explorer? Get-Process iexplore
Want to see Internet Explorer and Outlook? Get-Process iexplore, OUTLOOK
For more info, plus lots of other info about Powershell go to http://technet.microsoft.com/en-us/library/ee176855.aspx.
If you want to get the top 5 CPU using processes try this:
Get-Process | Sort-Object cpu -descending | Select-Object -first 5
As you can see you are piping the results of Get-Process through Sort-Object and then Select-Object.
Here’s a fun one to try from that page:
Get-Process | Select-Object name,fileversion,productversion,company
I won’t tell you what it does; go try it!