Excel data manipulation with powershell

Viewed 30

I'm working on a task to extract all users from x DL and export it to an excel file for it to be used in a future for another import task. I'm trying to wrap the emails with double quotes when exporting it to excel but for some reason is not showing whatsoever the weird thing is that if i open the same file with a text editor it will show there.

$DL = "DLNAME"
Get-ADGroupMember -Identity "$DL" -Recursive 
Get-ADUser -Properties Mail |
Select-Object Mail |
Export-CSV -Path C:\file1.csv -Usequotes always
0 Answers
Related