Bird
0
0

What does the PowerShell cmdlet Select-Object do when used with property names?

easy📝 Conceptual Q11 of 15
PowerShell - Cmdlets and Pipeline
What does the PowerShell cmdlet Select-Object do when used with property names?
AIt shows only the specified properties from the objects passed to it.
BIt deletes the specified properties from the objects.
CIt renames the specified properties in the output.
DIt sorts the objects based on the specified properties.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Select-Object purpose

    Select-Object is used to pick specific properties from objects, filtering out others.
  2. Step 2: Analyze the effect of specifying properties

    When you give property names, Select-Object returns only those properties in the output.
  3. Final Answer:

    It shows only the specified properties from the objects passed to it. -> Option A
  4. Quick Check:

    Select-Object with properties = show those properties [OK]
Quick Trick: Select-Object picks only listed properties to simplify output [OK]
Common Mistakes:
  • Thinking Select-Object deletes properties permanently
  • Confusing Select-Object with Sort-Object
  • Assuming it renames properties automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes