by admin » Tue May 10, 2016 2:09 pm
Solution:
In PowerShell, you can do this in different ways.
However, I have figured out how to do it using the following method. It involves piping the output of get-childitem into where-object. So the syntax goes like this :
get-childitem "c:\" | where-object { $_.Mode -ne "d----" }
Consequently, if you want to display directories only, you can change the conditional operator from "-ne" to "-eq".