Bird
0
0

Which of the following is the correct syntax to create a new AD user with username 'jdoe' and display name 'John Doe' using New-ADUser?

easy📝 Syntax Q12 of 15
PowerShell - Active Directory
Which of the following is the correct syntax to create a new AD user with username 'jdoe' and display name 'John Doe' using New-ADUser?
ANew-ADUser -SamAccountName 'jdoe' -DisplayName 'John Doe'
BNew-ADUser -Name 'jdoe' -DisplayName 'John Doe'
CNew-ADUser -UserName 'jdoe' -Display 'John Doe'
DNew-ADUser -User 'jdoe' -Name 'John Doe'
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct parameters for New-ADUser

    The parameter for username is -SamAccountName, and for display name is -DisplayName.
  2. Step 2: Check each option

    New-ADUser -SamAccountName 'jdoe' -DisplayName 'John Doe' uses -SamAccountName 'jdoe' and -DisplayName 'John Doe', which is correct syntax.
  3. Final Answer:

    New-ADUser -SamAccountName 'jdoe' -DisplayName 'John Doe' -> Option A
  4. Quick Check:

    SamAccountName sets username = A [OK]
Quick Trick: Use -SamAccountName for username in New-ADUser [OK]
Common Mistakes:
  • Using -UserName instead of -SamAccountName
  • Using -Name instead of -DisplayName
  • Mixing parameter names incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes