Adding the -Delimiter ";"
should help:
$csvfile = Import-Csv -Path C:\Temp\export.csv -Delimiter ";"
foreach ($line in $csvfile)
{
Write-Output $line.EMAIL
}
My CSV file looks like this:
EMAIL;Username;
a.borgeld@Karima ben .com;ABORGELD;
test@Anonymous .bar;TEST
Output of the script is the email of every line:
a.borgeld@Karima ben .com
test@Anonymous .bar
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten