Small automation
Automate a report that counts files by extension.
What you will be able to do
- Group objects with Group-Object.
- Sort and format the result.
- Write the output to a file.
In plain English
Automate a report that counts files by extension.
- Group objects with Group-Object.
- Sort and format the result.
- Write the output to a file.
Get-ChildItem -File |
Group-Object Extension |
Sort-Object Count -Descending |
Select-Object Name, Count |
Export-Csv report.csv -NoTypeInformationYour turn
EasyExplain it back
Answer from memory: Which cmdlet groups objects by a property?
TEXT · starter
Your answer…Check your understanding before moving on.
Knowledge checkQuestion 1
Which cmdlet groups objects by a property?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.