If I have two rows in a CSV file like below (but 200 entries or so).
$Username $Phone
Example.A 911
Example.B 123
How would I get PowerShell to take each row and enter it into a command?
I know how to do it if the phonenumber (Using a for each loop) is the same for everyone, but if everyone has a different phonenumber, how would I go about it then? Can I use a for each loop fetching two rows instead of 1 row from the csv file?
Foreach $Username, $Phonenumber in $CSV
Set-ADuser -identity $Username -PhoneNumber $Phonenumber
Above is how I would like it to be, but that doesn't work.