Bird
0
0

What is the primary purpose of the PowerShell cmdlet Sort-Object?

easy📝 Conceptual Q1 of 15
PowerShell - Cmdlets and Pipeline
What is the primary purpose of the PowerShell cmdlet Sort-Object?
ATo arrange objects in a specified order
BTo filter objects based on a condition
CTo group objects by property values
DTo remove duplicate objects from a list
Step-by-Step Solution
Solution:
  1. Step 1: Understand the function of Sort-Object

    Sort-Object is used to order objects by one or more properties.
  2. Step 2: Compare with other cmdlets

    Filtering is done by Where-Object, grouping by Group-Object, and removing duplicates by Select-Object -Unique.
  3. Final Answer:

    To arrange objects in a specified order -> Option A
  4. Quick Check:

    Sort-Object purpose = Arrange objects [OK]
Quick Trick: Sort-Object orders data; filtering uses Where-Object [OK]
Common Mistakes:
  • Confusing sorting with filtering
  • Thinking Sort-Object removes duplicates
  • Mixing grouping with sorting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes