Import-Csv -Path C:\users\user\desktop\test.csv |
ForEach-Object {Set-ADUser -Identity $_.user -Replace @{UID = $_.UID}}
I have the following script working great for my student users.
However, our staff users are being exported from a different system that have separate usernames.
(example: ad user = bmcalister | email = bmcalister@sd27j.net | IC username = mcalisterb)
IC is the import source.
Is there a way if I add email addresses into the CSV to identify the users via email address in AD to edit the UID attribute?
Thanks in advance!