I have a csv that looks like
Name, email, address
Name, email, address
Name, email, address
I am wanting to run
$csv = Import-Csv c:\path\to\your.csv
foreach ($line in $csv) {
New-Mailbox -Name $line.Name -WindowsLiveID $line.Email -ImportLiveId
}
First line of csv has to be something like Name,Email,Address
If you cannot have the header in the CSV, you can also have:
$csv = Import-Csv c:\path\to\your.csv -Header @("Name","Email","Address")
-Header doesn't modify the csv file in any way.