I have modified the code a little bit to give more better results.
$path = "\path\to\the\folder" $output = "\path\to\the\file" $count = Get-Childitem $path -Recurse -ErrorAction SilentlyContinue | where { -not $_.PSIsContainer } | group Extension -NoElement | sort count -desc $count >> $output
Output
0 comments:
Post a Comment