Reputation: 51
Does anyone know how to change the employeeNumber attribute on a mail contact in AD using PowerShell?
Nether New-MailContact, Set-MailContact or Set-Contact have a option for employeeNumber.
Asking google brings up questions about updating a user object, not a contact.
Upvotes: 1
Views: 234
Reputation: 1826
you can use set-adobject, the syntax is:
#This variable must contain the value to set
$id = [employeeId]
#-replace will replace a existing value with a new one
set-adObject -Identity [distinguishedName] -replace @{employeeId=$id}
Upvotes: 2