0

I have a PowerShell script that creates a batch file. If I use the Out-File cmdlet without forcing any specific encoding, it will create a file that is perfectly readable to myself, but will not execute.

If I open this file in Notepad and resave it using "ANSI" format, it will execute fine.

I have tried using the -Encoding option with each of the different options associated with that switch, but none of them produce a batch file that is capable of being executed.

Mofi
  • 46,139
  • 17
  • 80
  • 143
Brian
  • 1

0 Answers0