I have a script for testing an API which returns a base64 encoded image. My current solution is this.
$e = (curl.exe -H \"Content-Type: multipart/form-data\"
Running C# assemblies is native to PowerShell, therefore you are already writing bytes to a file "natively".
If you insist, you can use a construction like set-content test.jpg -value (([char[]]$decoded) -join "")
, this has a drawback of adding #13#10 to the end of written data. With JPEGs it's bearable, but other files may get corrupt from this alteration. So please stick with byte-optimized routines of .NET instead of searching for "native" approaches - these are already native.