Challenge - 5 Problems
Group Management Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this PowerShell command?
Consider the following command that lists all members of the group 'HRTeam'. What will be the output if the group has exactly two members: Alice and Bob?
PowerShell
Get-ADGroupMember -Identity HRTeam | Select-Object -ExpandProperty Name
Attempts:
2 left
💡 Hint
The command lists members and selects only their names.
✗ Incorrect
Get-ADGroupMember returns objects representing group members. Using Select-Object -ExpandProperty Name extracts just the names, outputting them as plain strings, one per line.
📝 Syntax
intermediate2:00remaining
Which command correctly adds a user to a group?
You want to add the user 'jdoe' to the group 'FinanceTeam'. Which of the following commands will do this correctly?
Attempts:
2 left
💡 Hint
Check the parameter names for the Add-ADGroupMember cmdlet.
✗ Incorrect
The correct syntax uses -Identity for the group and -Members for the user(s) to add. Option C matches this syntax exactly.
🔧 Debug
advanced2:00remaining
Why does this script fail to remove a user from a group?
This script is intended to remove user 'jdoe' from group 'SalesTeam', but it fails with an error. What is the cause?
Remove-ADGroupMember -Identity SalesTeam -Members jdoe
Error: "Cannot find an object with identity: 'jdoe'"
Attempts:
2 left
💡 Hint
The error says it cannot find the object 'jdoe'.
✗ Incorrect
The error indicates that the user 'jdoe' does not exist or cannot be found. The cmdlet accepts samAccountName, but if the user is missing or misspelled, it fails.
🚀 Application
advanced2:00remaining
How to list all groups a user belongs to?
You want to find all groups that the user 'maria' is a member of. Which command will correctly list these groups?
Attempts:
2 left
💡 Hint
User objects have a MemberOf property listing their groups.
✗ Incorrect
The MemberOf property of a user object contains the distinguished names of groups the user belongs to. Option A extracts this property correctly.
🧠 Conceptual
expert2:00remaining
What is the effect of the -Recursive switch in Get-ADGroupMember?
When using Get-ADGroupMember with the -Recursive switch, what is the expected behavior?
Attempts:
2 left
💡 Hint
Think about nested groups inside a group.
✗ Incorrect
The -Recursive switch causes the command to return all members including those inside nested groups, traversing the group membership tree.