My code:
New-ADUser -samaccountname first_last -Name "first last" -UserPrincipalName [email protected] -AccountPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd" -Force) -Enabled $true -PasswordNeverExpires $true -Path 'OU=EGC,DC=egc,DC=gov,DC=vm' -givenname 'first' -sn 'last' -displayname 'display name' -description 'IC NO' -title 'Job Title' -division '3' -physicaldeliveryofficename 'EGNC HQ' -telephonenumber '2424955' -mail '[email protected]' -department 'egnc hq' -company 'ministry PMO' -streetaddress 'Full Address Here' -postalcode 'BB3333'
One of the Error:
New-ADUser : A parameter cannot be found that matches parameter name 'telephonenumber'.
The error follows the the following LDAP attributes:
- sn
- physicalDeliveryOfficeName
- telephonenumber
User creation works if I remove the mentioned attributes.
Any fix for this?
Answer for:
- sn is Surname
- telephonenumber is officephone (Thanks to David Johnson)
- physicalDeliveryOfficeName is office (Thanks to David Johnson)
- mail is email