{"id":2622,"date":"2013-11-04T11:59:00","date_gmt":"2013-11-04T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/11\/04\/powertip-view-network-statistics-with-powershell\/"},"modified":"2013-11-04T11:59:00","modified_gmt":"2013-11-04T11:59:00","slug":"powertip-view-network-statistics-with-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-view-network-statistics-with-powershell\/","title":{"rendered":"PowerTip: View Network Statistics with PowerShell"},"content":{"rendered":"<p><strong>Summary<\/strong>: Learn how to use Windows PowerShell to view network statistics.<\/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 view the amount of data going through my network cards?<\/p>\n<p style=\"padding-left: 60px\"><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;One way is to use the performance counters.<\/p>\n<p style=\"padding-left: 120px\">To find available counters:<\/p>\n<p style=\"padding-left: 150px\">Get-Counter -ListSet &#8216;Network Adapter&#8217; | select -ExpandProperty PathsWithInstances | sort<\/p>\n<p style=\"padding-left: 120px\">To view the statistics for a particular card:<\/p>\n<p style=\"padding-left: 150px\">&nbsp;$test = Get-Counter -Counter &#8220;Network Adapter(Qualcomm Atheros AR5007 802.11b_g WiFi Adapter)Bytes Total\/sec&#8221; -MaxSamples 30<\/p>\n<p style=\"padding-left: 150px\">(This records thirty seconds of data by using the default sampling interval.)<\/p>\n<p style=\"padding-left: 120px\">To get the total traffic, use&nbsp;<strong>Measure-Object<\/strong>:<\/p>\n<p style=\"padding-left: 150px\">$test.CounterSamples | measure cookedvalue &ndash;Sum<\/p>\n<p style=\"padding-left: 150px\">(The&nbsp;<strong>&ndash;Sum<\/strong>&nbsp;property of the output holds the traffic level.)&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to view network statistics. &nbsp;How can I use Windows PowerShell to view the amount of data going through my network cards? &nbsp;One way is to use the performance counters. To find available counters: Get-Counter -ListSet &#8216;Network Adapter&#8217; | select -ExpandProperty PathsWithInstances | sort To view the statistics for [&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":[37,356,3,45],"class_list":["post-2622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-networking","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to view network statistics. &nbsp;How can I use Windows PowerShell to view the amount of data going through my network cards? &nbsp;One way is to use the performance counters. To find available counters: Get-Counter -ListSet &#8216;Network Adapter&#8217; | select -ExpandProperty PathsWithInstances | sort To view the statistics for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2622","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=2622"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2622\/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=2622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}