An administrator is creating an AD DS account for Noor Hamdan. The personnel record specifies Noor as the first name and Hamdan as the family name. A directory application reads those two attributes separately, so placing the complete name in either field would produce an incorrect record.
Which command correctly populates the separate name attributes?
Why
GivenName must contain Noor, and Surname must contain Hamdan. Supplying the complete name through Name does not replace the separate attribute values required by the application.
- Not correct:
New-ADUser -Name 'Noor Hamdan' -GivenName 'Noor Hamdan' -Surname Hamdan. The source example supplies the first name separately through GivenName. This command places the complete name in that attribute. - Not correct:
New-ADUser -Name 'Noor Hamdan' -GivenName Hamdan -Surname Noor. The source demonstrates separate GivenName and Surname parameters. This command reverses the required first-name and family-name values. - Not correct:
New-ADUser -Name 'Noor Hamdan' -GivenName Noor -Surname 'Noor Hamdan'. The source example supplies the family name separately through Surname. This command places the complete name in that attribute. - Correct:
New-ADUser -Name 'Noor Hamdan' -GivenName Noor -Surname Hamdan. This follows the source's parameter mapping: GivenName receives the first name and Surname receives the family name.
Source