1

With Get-Content -AsByteStream, one can read file as a byte stream.

With Set-Content -AsByteStream, one can create a file from a byte stream.

However, I can't find any way to pass these byte streams to other non-PowerShell command. Pipes between external commands always decode data as String, mangling binaries.

cmd /c --% or Start-Process -RedirectStandardInput do solve part of the problem, but it can get a bit tedious if any of involved command is another cmdlet. Is there a PowerShell-native way to handle executable input/output as a stream of byte?

snipsnipsnip
  • 1,921
  • 1
  • 32
  • 29

1 Answers1

2

There is an open issue on GitHub for that. (found via this answer)

snipsnipsnip
  • 1,921
  • 1
  • 32
  • 29