Hi, I have a Script to update some values in Active Directory from a CSV file, and works fine...
Import-Module ActiveDirectory
Import-CSV C:\Test\Users.csv |
ForEach-Object {
$record = $_
$s = @{}
if ($record.empnum) {$s["EmployeeID"] = $record.empnum }
if ($record.Phone) {$s["OfficePhone"] = $record.phone }
... etc...
Get-ADUser -filter "Name -eq `"$($_.nameusr)`"" | Set-ADUser @s
}
Now the challenge is update some data to "extension attribute", so I try with some like:
if ($record.usrID) {$s["extensionAttribute5"] = $record.usrID }
But i have this error:
Set-ADUser : A parameter cannot be found that matches parameter name 'extensionAttribute5'
Any suggestions on how to do this?
Tks