title: PowerShell equivalent of LINQ Any()?
body: <p>I would like to find all directories at the top level from the location of the script that are stored in subversion.</p>
  
  <p>In C# it would be something like this</p>
  
  <pre><code>Directory.GetDirectories(".")
    .Where(d=&gt;Directories.GetDirectories(d)
       .Any(x =&gt; x == "_svn" || ".svn"));
  </code></pre>
  
  <p>I'm having a bit of difficulty finding the equivalent of "Any()" in PowerShell, and I don't want to go through the awkwardness of calling the extension method.</p>
  
  <p>So far I've got this:</p>
  
  <pre><code> Get-ChildItem | ? {$_.PsIsContainer} | Get-ChildItem -force | ? {$_.PsIsContainer -and $_.Name -eq "_svn" -or $_.Name -eq ".svn"
  </code></pre>
  
  <p>This finds me the <code>svn</code> directories themselves, but not their parent directories - which is what I want. Bonus points if you can tell me why adding</p>
  
  <pre><code> | Select-Object {$_.Directory}
  </code></pre>
  
  <p>to the end of that command list simply displays a sequence of blank lines.</p>