Tag Info

New answers tagged

0

What error are you getting? Is it working on some users, failing on others? Are you sure all the employees ALREDY have employee ID's? If there are users without EID's, the code mod below would handle the error more gracefully. You may want to get-user based on samaccountname which is a required field (EID is not required) $user = Get-ADUser -Filter ...


3

First, create an object with all the data like this: $Path = "location of csv" $Users = Get-Content -Path $Path | ConvertFrom-CSV Then just iterate through the rows of data like this: $Users | %{ #Set ad user stuff using $_.Attribute }



Top 50 recent answers are included