Powershell Notes

Get names of all directories in current script root:

$dirs = Get-ChildItem $PSScriptRoot |
       Where-Object {$_.PSIsContainer} | # analog of `.Where` Linq function in C#
       Foreach-Object {$_.Name} # analog of `.Select` Linq function in C#

Reference: here