{"id":2492,"date":"2013-12-02T11:59:00","date_gmt":"2013-12-02T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/12\/02\/powertip-use-powershell-to-group-processes-in-windows\/"},"modified":"2013-12-02T11:59:00","modified_gmt":"2013-12-02T11:59:00","slug":"powertip-use-powershell-to-group-processes-in-windows","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-use-powershell-to-group-processes-in-windows\/","title":{"rendered":"PowerTip: Use PowerShell to Group Processes in Windows"},"content":{"rendered":"<p><strong>Summary<\/strong>: Use Windows PowerShell to group the numbers of processes in Windows.\n&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;How can I use Windows PowerShell to determine the number of processes that are running&mdash;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for example, if I notice that there are multiple copies of the same processes running?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;Use the&nbsp;<strong>Get-Process<\/strong>&nbsp;cmdlet, group the output on the&nbsp;<strong>Name<\/strong>&nbsp;property, and sort the count <br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where there is more than one instance of the process.<\/p>\n<p style=\"padding-left: 90px\">In Windows PowerShell 4.0 or Windows PowerShell 3.0:<\/p>\n<p style=\"padding-left: 120px\">Get-Process | group name | sort count -Descending | where count -gt 1<\/p>\n<p style=\"padding-left: 90px\">In Windows PowerShell&nbsp;2.0 or earlier:<\/p>\n<p style=\"padding-left: 120px\">Get-Process | group name | sort count -Descending | where {$_.count -gt 1}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use Windows PowerShell to group the numbers of processes in Windows. &nbsp; &nbsp;How can I use Windows PowerShell to determine the number of processes that are running&mdash;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for example, if I notice that there are multiple copies of the same processes running? &nbsp;Use the&nbsp;Get-Process&nbsp;cmdlet, group the output on the&nbsp;Name&nbsp;property, and [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[356,3,45],"class_list":["post-2492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use Windows PowerShell to group the numbers of processes in Windows. &nbsp; &nbsp;How can I use Windows PowerShell to determine the number of processes that are running&mdash;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for example, if I notice that there are multiple copies of the same processes running? &nbsp;Use the&nbsp;Get-Process&nbsp;cmdlet, group the output on the&nbsp;Name&nbsp;property, and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=2492"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2492\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=2492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}