Windows PowerShell One-Liner: List all the subdirectories in the current directory

dir | where {$_.PsIsContainer}


Alternatively you could:


dir |where {$_.mode -match “d”}


Jeffrey Snover
Windows PowerShell Architect