I want to pipe the output of a command to a file:
PS C:\\Temp> create-png > binary.png
I noticed that Powershell changes the encoding
Create a batchfile containing the line
create-png > binary.png
and call that from Powershell via
& cmd /c batchfile.bat
If you'd rather pass the command to cmd as command line parameter:
$x = "create-png > binary.png" & cmd /c $x