Using redirection within the script produces a unicode output. How to emit single-byte ASCII text?

You could change the $OutputEncoding variable before writing to the file. The other option is not to use the > operator, but instead pipe directly to Out-File and use the -Encoding parameter.

Leave a Comment