title: Using arrays with where-object to filter multiple strings out of a csv
body: <p>I am trying to filter out lines out of a csv that contain any of the values in an array. </p>
  
  <p>Using this post as reference:
  <a href="https://stackoverflow.com/questions/848859/use-notlike-to-filter-out-multiple-strings-in-powershell">Use -notlike to filter out multiple strings in PowerShell</a></p>
  
  <p>I managed to get it working with this format:</p>
  
  <pre><code>Import-Csv "$LocalPath\Stripped1Acct$abbrMonth$Year.csv" | 
      where {$_."SubmitterName" -notlike "*${Report2a}*" 
        -and $_."SubmitterName" -notlike "*${Report2b}*" 
        -and $_."SubmitterName" -notlike "*${Report2c}*"} |
      Export-Csv "$LocalPath\Stripped2Acct$abbrMonth$Year.csv" -NoTypeInformation
  </code></pre>
  
  <p>Eventually I plan to rewrite the script so it will pull the exclusion list from a text file generated by an end user. In order to do that, I'll have to have it access values in an array. I tried doing that with the following syntax, but it didn't work as intended:</p>
  
  <pre><code>Import-Csv "$LocalPath\Stripped1Acct$abbrMonth$Year.csv" | 
      where {$_."SubmitterName" -notlike "*${Report2[0]}*" 
        -and $_."SubmitterName" -notlike "*${Report2[1]}*" 
        -and $_."SubmitterName" -notlike "*${Report2[2]}*"} |
      Export-Csv "$LocalPath\Stripped2Acct$abbrMonth$Year.csv" -NoTypeInformation
  </code></pre>
  
  <p>I have a feeling it's just an syntax issue, but after playing around with it for far too long, I've run out of ideas.
  I have a feeling it's a syntax issue</p>