title: Match and $Matches in Powershell via RegEx
body: <p>I have a little issue with a Powershell project, I've been working on for some time now.</p>
  <p>The basic idea is that six iPerf speed measurements will be executed.
  A logfile is created to have some data which can be displayed to the user.</p>
  <p>But there's some issue with the match and variable Matches in Powershell to display multiple values..</p>
  <p>There's the code, I've been working on..</p>
  <pre><code>
      $1 = (Get-Content -Path 'iperf3.txt' -TotalCount 398)[-1] # Fetch details about speed measurements for download
      $2 = (Get-Content -Path 'iperf3.txt' -TotalCount 796)[-1] # Fetch details about speed measurements for upload
      $3 = (Get-Content -Path 'iperf3.txt' -TotalCount 1195)[-1] # Same as above
      $4 = (Get-Content -Path 'iperf3.txt' -TotalCount 1593)[-1] # Same as above
      $5 = (Get-Content -Path 'iperf3.txt' -TotalCount 1992)[-1] # Same as above
      $6 = (Get-Content -Path 'iperf3.txt' -TotalCount 2390)[-1] # Same as above
  
  </code></pre>
  <p><strong>Output via Get-Content and TotalCount</strong></p>
  <pre><code>
      [SUM]   0.00-30.00  sec  1.09 GBytes   313 Mbits/sec                  receiver
      [SUM]   0.00-30.00  sec  1.09 GBytes   312 Mbits/sec                  receiver
      [SUM]   0.00-30.00  sec  1.11 GBytes   317 Mbits/sec                  receiver
      [SUM]   0.00-30.00  sec  1.09 GBytes   311 Mbits/sec                  receiver
      [SUM]   0.00-30.00  sec  1.11 GBytes   317 Mbits/sec                  receiver
      [SUM]   0.00-30.00  sec  1.09 GBytes   312 Mbits/sec                  receiver
  
  </code></pre>
  <p>Afterwards, I use the RegEx and Variable to output the numbers before Mbits/sec and include Mbits/sec from this line of code..</p>
  <pre>
  
      $1 -match '\d+\sMbits[/]sec'
      $2 -match '\d+\sMbits[/]sec'
  
  etc.</pre>
  <p>I do variable Matches to validate that the Variable is <strong>True</strong>, and receive the output of 312 Mbits/sec, but nothing more.</p>
  <p>Now this is where I cannot see the fault in the code. The variable passed and it's true, but I only have one <strong>Value</strong> as 313 Mbits/sec via Value.</p>
  <p>I figured that I would see both <strong>313 Mbits/sec</strong> and <strong>312 Mbits/sec</strong> in the output/value prompt.</p>
  <p>Did I do something wrong while using the match/Matches variable/function?</p>
  <p>Any feedback and/or suggestions will be appreciated.</p>