title: Powershell import csv where column data matches data in txt file
body: <p>I have a csv file that has header called CompanyName.
  In the csv there are tons of rows and different company names.
  But I keep a text file with specific companies whose data I need to retrieve.
  Through PowerShell is there a way to make the Where-Object check through a txt file.
  Something like:</p>
  <pre><code>Import-Csv -Path myCSV | Where-Object { $_.'CompanyName' -in names.txt}
  </code></pre>
  <p>The above doesn't actually work.
  I even put the names from the text file into an array and tried checking like that but it also doesn't work.</p>
  <pre><code>$arr = [string[]]$arrayFromFile = Get-Content -Path &quot;names.txt&quot;
  Import-Csv -Path myCSV | Where-Object {$_.'CompanyName' -in $arr  }
  </code></pre>