Bird
0
0

What will this PowerShell command output?

medium📝 Command Output Q4 of 15
PowerShell - Basics and Environment
What will this PowerShell command output?
Get-Process | Where-Object { $_.Handles -gt 500 }
AProcesses with more than 500 handles
BProcesses with less than 500 handles
CAll processes regardless of handles
DAn error because Handles is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command pipeline

    Get-Process lists all processes; Where-Object filters them based on the condition.
  2. Step 2: Analyze the filter condition

    The condition $_.Handles -gt 500 selects processes with Handles greater than 500.
  3. Final Answer:

    Processes with more than 500 handles -> Option A
  4. Quick Check:

    Filter by Handles > 500 = B [OK]
Quick Trick: Where-Object filters objects by property conditions [OK]
Common Mistakes:
  • Confusing greater than with less than
  • Assuming Handles property doesn't exist
  • Thinking it returns all processes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes