Bird
0
0

Given this command:

medium📝 Command Output Q5 of 15
PowerShell - Working with Objects
Given this command:
Get-ChildItem | Group-Object -Property Extension

What does the Count property represent in each group?
ANumber of files with the same extension
BTotal size of files in the group
CNumber of folders in the directory
DLength of the extension string
Step-by-Step Solution
Solution:
  1. Step 1: Understand grouping by Extension

    Files are grouped by their extension property.
  2. Step 2: Meaning of Count property

    Count shows how many items are in each group, i.e., files sharing the same extension.
  3. Final Answer:

    Number of files with the same extension -> Option A
  4. Quick Check:

    Count = number of grouped items [OK]
Quick Trick: Count shows how many items share the group key [OK]
Common Mistakes:
  • Confusing Count with file size
  • Thinking Count counts folders
  • Assuming Count is string length

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes