two columns of data in a csv file

I have a csv file with two columns

email | phone

aa@company 1234

bb@company 5678

If there is only one column this works

Import-csv -Path c:Emails1.csv -delimiter “;” | ForEach {

Get-ADUser -Filter “EmailAddress -eq ‘$($_.email)'” -Properties * | select userprincipalname, emailaddress,TelephoneNumber, GivenName, SN, Officephone, HomePhone, pager, Mobile, Fax, ipPhone

}

However once there is a second column in the .csv file it no longer works

How do I access the second column to set-aduser with the new telephone numbers?

submitted by /u/workyworky11
[link] [comments]

Leave a Reply