Powershell correct encoding of exe-output
<p>I googled a lot, but I didn't find a solution for my problem. I want to call an exe from powershell and capture the output. This output I want to display correctly in the console and write it to a file:</p>

<pre><code>$output = &amp; ".\myExe.exe" $path
Write-Host $output
$output | Out-File -Append -Encoding UTF8 -filepath $destFile
</code></pre>

<p>This works only for non special chars. But if the output contains e.g. a Umlaut (ä,ö,ü) it does not work. Then I get something like this: õ÷³</p>

<p>Can anyone help, please?</p>