title: Parsing Get-Counter data to just get the values
body: <p>I would like to get the total number of bytes that my computer has sent/received over some interval.</p>
  <p>Powershell has a handy cmdlet that gets me access to that information (Qualcomm Atheros AR9285 Wireless Network Adapter is the name of my interface):</p>
  <p><code>Get-Counter -Counter &quot;\Network Interface(Qualcomm Atheros AR9285 Wireless Network Adapter)\Bytes received/sec&quot; -Continuous</code></p>
  <p>It gets the data just fine, but it comes out like this:</p>
  <p><img src="https://i.stack.imgur.com/sKbs9.jpg" alt="enter image description here" /></p>
  <p>The closes I could get to having it come out the way I wanted was using <code>Get-Counter -Counter &quot;\Network Interface(Qualcomm Atheros AR9285 Wireless Network Adapter)\Bytes received/sec&quot; -Continuous | Format-Table -Property Readings</code> but that still had a long path name in front of the value I want.</p>
  <p>Additionally, if I try setting the output to be some variable, no assignment ever gets done (variable stays null).</p>
  <p>How can I get this data in a decent format?</p>
  <p><strong>Note:</strong> The goal is to keep a running tally of this information, and then do something when it reaches a threshold. I can do that if I can get the above to work, but if there is a better way to do it, I am more than happy to use that instead.</p>