title: How to exclude list of items from Get-ChildItem result in powershell?
body: <p>I want to get list of files (actually number of files) in a path, recursively, excluding certain types:</p>
  
  <pre><code>Get-ChildItem -Path $path -Recurse | ? { $_.Name -notlike "*.cs" -and $_.Name -notlike "*.tt" }
  </code></pre>
  
  <p>but I have a long list of exclusions (to name a few):</p>
  
  <pre><code>@("*.cs", "*.tt", "*.xaml", "*.csproj", "*.sln", "*.xml", "*.cmd", "*.txt")
  </code></pre>
  
  <p>How to get the list using this form:</p>
  
  <pre><code>Get-ChildItem -Path $path -Recurse | ? { &lt;# what to put here ?#&gt; }
  </code></pre>
  
  <p>?</p>