title: Powershell - LIKE against an array
body: <p>For every file being processed, its name is being checked to satisfy the condition. For example, given the following list of filters:</p>
  
  <pre><code>$excludeFiles = @"
  aaa.bbb
  ccccc.*
  ddddd???.exe
  "@ | SplitAndTrim;
  </code></pre>
  
  <p>It should exclude a file from processing if it matches any of the lines. Trying to avoid <code>match/regex</code>, because this script needs to be modifiable by someone who does not know it, and there are several places where it needs to implemented.</p>
  
  <p><code>$excludedFiles</code> and similar are defined as a here-string on purpose. It allows the end user/operator to paste a bunch of file names right from the CMD/Powershell window.</p>
  
  <p>It appears that Powershell does not accept <code>-like</code> against an array, so I cannot write like this:</p>
  
  <pre><code>"ddddd000.exe" -like @("aaa.bbb", "ccccc.*", "ddddd???.exe")
  </code></pre>
  
  <p>Did I miss an option? If it's not natively supported by Powershell, what's the easiest way to implement it?</p>