title: How to Compress-Archive all files in a folder except for ones that qualify an array of regex
body: <p>I want to Compress-Archive a folder except for any files/subfolders that pass an array of regex.
  I'm trying something like this:</p>
  
  <pre><code>$FilesToExclude = @("**/*.*proj*", "**/obj/**", "**/bin/Debug/**", "**/bin/Release/**", "**/*.vb", "**/*.cs", "**/AssemblyInfo.vb", "**/AssemblyInfo.cs", "**/Properties/", "**/Debug/**", "**/Release/**", "**/My Project/**", "**/Web.Debug.config", "**/Web.Release.config", "**/*.pdb", "**/*.sln")
  
  Get-ChildItem -Path &lt;path&gt; | Where-Object { $_ -notmatch $FilesToExclude } | Compress-Archive -DestinationPath destination -Update
  </code></pre>
  
  <p>But it doesn't seem to be doing anything. What am I doing wrong?</p>