title: Get-ChildItem Where filter not bringing back any results
body: <p>I am trying to create a script that will sign my MSI files via powershell.  I have the signing tool sorted, but the issue I am having is getting to my MSI files. </p>
  
  <p>Consider the following folder tree. </p>
  
  <pre><code>production
  └───deployment
      └───install
          └───validationtool
              │   test.msi
              │
              └───bin
                  ├───debug
                  │       test.msi
                  │
                  └───release
                          test.msi
  </code></pre>
  
  <p>The code I am using is </p>
  
  <pre><code>$target = "*.msi"
  $releaseList = "vt.Setup", "ieh", "vt" 
  $requiredFiles = gci $path -recurse -filter $target | ?{ $releaseList -contains ((Split-Path $_.Directory).Split('\') | Select -Last 1)}
  </code></pre>
  
  <p>I am trying to locate MSI files where a folder 3 levels up is one of the folders in the <code>$releaseList</code>. Currently now it is not returning the correct folders. </p>
  
  <p>If I just use the line below</p>
  
  <pre><code>$requiredFiles = gci $path -recurse -filter $target 
  </code></pre>
  
  <p>It brings me back all the MSI files and directories so I know that part is working. </p>
  
  <p>Any and all help very much appreciated. As a bonus if we could omit files with debug in the path that would be helpful.</p>