Bird
0
0

You run this command to update a user's department:

medium📝 Debug Q14 of 15
PowerShell - Active Directory
You run this command to update a user's department:
Set-ADUser -Identity 'bwhite' -Department 'Sales'

But you get an error: "Cannot find an object with identity: 'bwhite'". What is the most likely cause?
AThe Identity parameter requires an email address
BThe Department property cannot be set with Set-ADUser
CUser 'bwhite' does not exist in Active Directory
DYou must use New-ADUser to update users
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    The error says it cannot find an object with identity 'bwhite', meaning the user does not exist or the name is incorrect.
  2. Step 2: Check other options

    Department can be set with Set-ADUser, New-ADUser is for creating users, and Identity accepts username or distinguished name, not necessarily email.
  3. Final Answer:

    User 'bwhite' does not exist in Active Directory -> Option C
  4. Quick Check:

    Identity error means user missing = D [OK]
Quick Trick: Check user exists before Set-ADUser [OK]
Common Mistakes:
  • Assuming Department can't be set
  • Using New-ADUser to update existing users
  • Using wrong Identity format without verifying user

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes