title: powershell, foreach, get the number of line
body: <p>Is there any possibility to get the number of a $_. Variable in a foreach pipe?</p>
  
  <p>Example:</p>
  
  <pre><code>$a = 1..9
  $a | foreach {if ($_ -eq 5) { "show the line number of $_"}}
  </code></pre>
  
  <p>I hope you know what i mean.</p>
  
  <p>Thanks!</p>