So I'm running an external command in powershell to pipe mysqldump.exe output into a .sql file.
& "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe" @arguments | Out-File -Encoding utf8 $backupFilePath\$database.sql
Firstly, the file came out in UCS2 encoding. I managed to work out that you can set the encoding on the Out-File command to be -Encoding utf8. But it puts on a Byte Order Mark. Is there any way to explicitly specify that you do not want the Byte Order Mark?
I tried converting the file using WriteAllLines, but this database .sql file output is 3GB in size, and it smashes the memory.
Any thoughts?