November 2018
Intermediate to advanced
566 pages
17h 15m
English
To group objects based on a property, we will use the Get-ChildItem cmdlet on the files that we created for use in this book:
PS> Set-Location ~/random
PS> Get-ChildItem -Path . -File
Alternatively, you can use the shorthand version:
PS> gci -File
PS> Get-ChildItem . -File | Group-Object Extension
The shorthand version of this would be as follows:
PS> gci -File | group Extension
Here are all of the files, grouped by their extensions:

Read now
Unlock full access