Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: Use PowerShell to Group Processes in Windows

$
0
0

Summary: Use Windows PowerShell to group the numbers of processes in Windows.

 

Hey, Scripting Guy! Question How can I use Windows PowerShell to determine the number of processes that are running—
          for example, if I notice that there are multiple copies of the same processes running?

Hey, Scripting Guy! Answer Use the Get-Process cmdlet, group the output on the Name property, and sort the count
          where there is more than one instance of the process.

In Windows PowerShell 4.0 or Windows PowerShell 3.0:

Get-Process | group name | sort count -Descending | where count -gt 1

In Windows PowerShell 2.0 or earlier:

Get-Process | group name | sort count -Descending | where {$_.count -gt 1}


Viewing all articles
Browse latest Browse all 17778

Trending Articles