2020/04/11 #Group-Object の使い方

皆様おはようございます、

昨日は投稿ロスってしまいすみません

#猫でもできるPowerShell(備忘録)

#Group-Object の使い方

 

Group-Object

https://go.microsoft.com/fwlink/?LinkID=113338

 

$files = Get-ChildItem -Path $PSHOME -Recurse

$files | Group-Object -Property extension -NoElement | Sort-Object

-Property Count -Descending

 

Count Name

----- ----

365 .xml

231 .cdxml

197

169 .ps1xml

142 .txt

114 .psd1

63 .psm1

49 .xsd

36 .dll

15 .mfl

15 .mof

...

 

MSのコピペですみませんが、Select-Object に比べて

なかなか身に付かないところがあるため・・

ではまた;

"