How to group processes with their name in PowerShell?



You can group the processes based on their properties. Here, we will group the processes based on their name, it would display how many instances of the process is running. Group-Object command is useful for it.

Command

The below command will group the object and sort the object based on their thread counts.

Get-Process |Group-Object Name | Select Name, Count |Sort-Object count - Descending

Output

Name                                                           Count
----                                                           -----
svchost                                                           91
chrome                                                            34
RuntimeBroker                                                     11
conhost                                                            6
Code                                                               6
WmiPrvSE                                                           6
dllhost                                                            4
RAVBg64                                                            4
powershell                                                         3
csrss                                                              2
fontdrvhost                                                        2
AcroRd32                                                           2
taskhostw                                                          2
SkypeBridge                                                        1
smartscreen                                                        1
smss                                                               1
sihost                                                             1
SkypeApp                                                           1
SkypeBackgroundHost                                                1
sppsvc                                                             1
StartMenuExperienceHost                                            1

Advertisements