Bird
0
0

What will this command output?

medium📝 Command Output Q5 of 15
PowerShell - Active Directory
What will this command output?
Get-ADUser -Filter 'Department -eq "Sales"' -Properties Title | Select-Object Name, Title
AError because Title is not a valid property
BUsers in Sales department with their names and titles
CAll users with only their names
DUsers in Sales department with only their names
Step-by-Step Solution
Solution:
  1. Step 1: Understand the filter and properties

    The filter selects users where Department equals 'Sales'. The -Properties Title adds the Title attribute to the output.
  2. Step 2: Select-Object output

    Select-Object chooses to display Name and Title for each user.
  3. Final Answer:

    Users in Sales department with their names and titles -> Option B
  4. Quick Check:

    Filter Sales dept + select name/title = Users in Sales department with their names and titles [OK]
Quick Trick: Add -Properties to get extra attributes like Title [OK]
Common Mistakes:
  • Assuming Title is invalid property
  • Expecting all users instead of filtered
  • Selecting only names without titles

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes