PowerTip: Use a PowerShell 3.0 Switch to Find Only Directories
Summary: Use a switch in Windows PowerShell 3.0 to easily find only directories.
How can I use Windows PowerShell 3.0 to find a list of only directories from my current location?
Use the –Directory switch with the Get-ChildItem cmdlet.
Note The –Directory switch was added to Windows PowerShell 3.0.