Now that in Powershell dir is just an alias to Get-ChildItem, how can I get a list of just folders?
I've been doing dir /ad (for Attribute Directory) in the command prompt for about 20 years. Is there any way to alias this with parameters in PowerShell?
I see How do I get only directories using Get-ChildItem? over on Stack Overflow but I'm not going to type Get-ChildItem -Recurse | ?{ $_.PSIsContainer } by hand every time. Ideally I'd like dir /ad to alias to that command.
cmd /c dir /ad?&dirbut didn't think of doingcmd /cdir /ador anything with arguments, but you can certainly alias it todir-adordirador something like that.