title: Return line number from string match
body: <p>I'm trying to get the line number returned on a string search into a variable.</p>
  
  <p><strong>Process</strong></p>
  
  <ol>
  <li>run through filtered files in a directory</li>
  <li>open each file and search for string</li>
  <li>store line number with text match</li>
  </ol>
  
  <p>I get the line number to return, but don't know how to work with it from here.</p>
  
  <pre><code># Pull files from source directory with extension filter
  Get-ChildItem $SourceDirectory -Filter $OutputFileExtension -Recurse |
      ForEach-Object {
          Select-String $_ -Pattern $TargetString |
              Select-Object -ExpandProperty 'LineNumber'
      }
  </code></pre>