I want to export some data with Powershell to upload them to a online-portal. I'am using Export-CSV function to export a Variable with the content to a csv file which i can upload to the portal.
String to Export the previously collected data:
$Content | Export-Csv -Path c:\temp\content.csv -NoTypeInformation
Serial Number,Device Name / Hostname,Tags,Notes
FTX123456A1,My Cisco Router,System,System1
$Content | Export-Csv -Path c:\temp\content.csv -NoTypeInformation -encoding UTF8
As above would specify the encoding to UTF8
Source (and to see diffrent encoding types): https://technet.microsoft.com/en-us/library/hh849932.aspx