PowerTip: Use PowerShell to Group Processes in Windows

Doctor Scripto

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}

0 comments

Discussion is closed.

Feedback usabilla icon