title: Powershell: Filter the contents of a file by an array of strings
body: <p>Riddle me this:</p>
  
  <p>I have a text file of data.  I want to read it in, and only output lines that contain any string that is found in an array of search terms.</p>
  
  <p>If I were looking for just one string, I would do something like this:</p>
  
  <pre><code>get-content afile | where { $_.Contains("TextI'mLookingFor") } | out-file FilteredContent.txt
  </code></pre>
  
  <p>Now, I just need for "TextI'mLookingFor" to be an array of strings, where if $_ contains any string in the array, it is passed down the pipe to out-file.</p>
  
  <p>How would I do that (and BTW, I'm a c# programmer hacking this powershell script, so if there is a better way to do my match above than using .Contains(), clue me in!)</p>