Bird
0
0

What will happen if you run this command when the user 'Eve' is already a member of the 'Users' group?

medium📝 Command Output Q5 of 15
PowerShell - Active Directory
What will happen if you run this command when the user 'Eve' is already a member of the 'Users' group?
Add-LocalGroupMember -Group 'Users' -Member 'Eve'
AEve is added again, creating duplicate membership
BError: User 'Eve' is already a member of the group
CNo change; Eve remains a single member without error
DThe group 'Users' is deleted
Step-by-Step Solution
Solution:
  1. Step 1: Understand Add-LocalGroupMember behavior

    This cmdlet adds a user to a group but throws an error if the user is already a member.
  2. Step 2: Predict the command effect

    Since 'Eve' is already a member, the command throws an error.
  3. Final Answer:

    Error: User 'Eve' is already a member of the group -> Option B
  4. Quick Check:

    Adding existing member = throws error [OK]
Quick Trick: Add-LocalGroupMember throws error if user already in group [OK]
Common Mistakes:
  • Expecting duplicate entries
  • Thinking it ignores duplicates silently
  • Confusing group deletion with add command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes