Here is what I have so far:
Sample of CSV
User,ID
jsmith,1234
jdoe,5678
PowerShell Script
Import-CSV "C:\Scripts\Users.csv" | % {
$User = $_.UserName
$ID = $_.EmployeeID
Set-ADUser $User -EmployeeID $ID
}
Here is the error that I am running into
Set-ADUser : Cannot validate argument on parameter 'Identity'. The argument is null. Provide a valid value for theargument, and then try running the command again.
At line:4 char:12
+ Set-ADUser $User -EmployeeID $ID
+ ~~~~~
+ CategoryInfo : InvalidData: ( [set-ADUser], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.SetADUser
Any ideas? Thanks!