Bird
0
0

What will this PowerShell command output?

medium📝 Command Output Q13 of 15
PowerShell - Active Directory
What will this PowerShell command output?
Get-ADUser -Filter 'Enabled -eq $true' | Select-Object -ExpandProperty Name
AList of all disabled user names
BError due to wrong filter syntax
CList of all group names
DList of all enabled user names
Step-by-Step Solution
Solution:
  1. Step 1: Understand the filter condition

    The filter 'Enabled -eq $true' selects only users whose Enabled property is true (active users).
  2. Step 2: Analyze the Select-Object usage

    Select-Object -ExpandProperty Name extracts just the user names from the results.
  3. Final Answer:

    List of all enabled user names -> Option D
  4. Quick Check:

    Filter enabled users = list names [OK]
Quick Trick: Filter Enabled -eq $true lists active users only [OK]
Common Mistakes:
  • Thinking it lists disabled users
  • Assuming it returns groups instead of users
  • Believing the filter syntax causes error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes