Bird
0
0

What will be the output of this PowerShell command?

medium📝 Command Output Q4 of 15
PowerShell - Active Directory
What will be the output of this PowerShell command?
Get-ADOrganizationalUnit -Filter 'Name -eq "Finance"' | Select-Object Name, DistinguishedName
ACreates a new OU named 'Finance'
BDeletes the OU named 'Finance'
CDisplays the Name and DistinguishedName of the OU named 'Finance'
DReturns an error due to incorrect syntax
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the cmdlet and filter

    Get-ADOrganizationalUnit with -Filter 'Name -eq "Finance"' retrieves the OU named Finance.
  2. Step 2: Understand Select-Object usage

    Select-Object chooses to display only Name and DistinguishedName properties.
  3. Final Answer:

    Displays the Name and DistinguishedName of the OU named 'Finance' -> Option C
  4. Quick Check:

    Get-ADOrganizationalUnit with filter shows OU info [OK]
Quick Trick: Get-ADOrganizationalUnit with filter retrieves OU info [OK]
Common Mistakes:
  • Thinking it creates or deletes an OU
  • Assuming syntax error due to quotes
  • Confusing Select-Object with creation cmdlets

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes