Using PowerShell to write a file in UTF-8 without the BOM $MyFile = Get-Content $MyPath $MyFile | Out-File -Encoding "UTF8" $MyPath $MyFile = Get-Content $MyPath $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False) [System.IO.File]::WriteAllLines($MyPath, $MyFile, $Utf8NoBomEncoding)