Bird
0
0

Which of the following is the correct syntax to group services by their status using Group-Object with the -Property parameter?

easy📝 Syntax Q3 of 15
PowerShell - Working with Objects
Which of the following is the correct syntax to group services by their status using Group-Object with the -Property parameter?
AGet-Service | Group-Object -Property Status
BGet-Service | Group-Object Status
CGet-Service | Group-Object -Status
DGet-Service | Group-Object Status -Property
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct parameter usage

    Group-Object uses -Property to specify the property to group by.
  2. Step 2: Check syntax correctness

    Get-Service | Group-Object -Property Status correctly uses '-Property Status'. Options A, B, and D misuse parameters or order.
  3. Final Answer:

    Get-Service | Group-Object -Property Status -> Option A
  4. Quick Check:

    Correct syntax = -Property [OK]
Quick Trick: Use -Property to specify grouping property [OK]
Common Mistakes:
  • Omitting -Property
  • Using wrong parameter names
  • Incorrect parameter order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes