When I use the following statement:
write "rem Beginning " | Out-File -filepath c:\data\RecreateLogs.cmd -Force
The first character is not recognized and I get this error when I run the cmd file.
D:\Data>RecreateLogs.cmd
D:\Data>■p
'■p' is not recognized as an internal or external command,
operable program or batch file.
I've tried different -Encoding with no luck. Any ideas?