Bird
0
0

What will this PowerShell command output?

medium📝 Command Output Q13 of 15
PowerShell - Basics and Environment
What will this PowerShell command output?
Get-Process | Where-Object { $_.CPU -gt 100 }
AProcesses using more than 100 CPU seconds
BAll processes running on the system
CProcesses with CPU usage less than 100
DAn error because of wrong syntax
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command parts

    Get-Process lists all processes; Where-Object filters those with CPU > 100 seconds.
  2. Step 2: Interpret the filter condition

    The condition $_.CPU -gt 100 means CPU time greater than 100 seconds.
  3. Final Answer:

    Processes using more than 100 CPU seconds -> Option A
  4. Quick Check:

    Filter processes by CPU > 100 = C [OK]
Quick Trick: Where-Object filters output by condition [OK]
Common Mistakes:
  • Thinking it lists all processes without filtering
  • Confusing CPU time with CPU percentage
  • Assuming syntax error due to $_ usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes