This seems so simple, but I have spent hours digging and could not find a solution. I try to manipulate others scripts to meet my needs but I keep jacking it up somehow. I am not great with Powershell.
I have the following command that seems to work great. It successfully pulls the name/MobilePhone and imports it into AD.
Import-Csv -Path .\test123.csv | ForEach {Set-ADUser $_.name -mobilePhone $_.MobilePhone}
The problem is that the default "ADUser" value in AD is very inconsistent. Over the years people have created ADUser accounts in many different ways. Some using the employees ID, some being FirstnameLastInitial, some being fullname. So I am wanting to mass update the mobilePhone value with users EmployeeID value instead. As everyone should have an accurate EmployeeID value...
Does anyone know the command I can use to meet this requirement?
The test123.csv has two columns. One "name" column and one "MobilePhone" column.