title: List folders at or below a given depth in Powershell
body: <p>I have a directory which contains a lot of folders. I want to list all folder (path) that go deeper than 2 levels. So in below case folder 1 &amp; 2.</p>
  
  <pre><code>Directory/folder1
  Directory/folder1/test1/test/testsub
  Directory/folder1/test2
  Directory/folder1/test3
  Directory/folder2/blablabla/bla/1
  Directory/folder3/test
  Directory/folder4/test
  Directory/folder5/test
  </code></pre>
  
  <p>I was trying the following:</p>
  
  <pre><code>$Depth = 3
  $Path = "."
  
  $Levels = "\*" * $Depth
  $Folder = Get-Item $Path
  $FolderFullName = $Folder.FullName
  Resolve-Path $FolderFullName$Levels | Get-Item | ? {$_.PsIsContainer} | Write-Host
  </code></pre>