I have a script that writes data to the telephone fax field in AD. First it imports the csv file and then checks AD by the first field which is samAccountname and then finds out if fax field is blank or not . If it is not blank it tells user fax field contains a fax number already. If it is blank it writes the new fax number. I have it working if i manually ad the get-aduser. I can not figure out how to have the for each loop to make it work .
I have included sample csv and script .
(Please visit the site to view this media)