I have written a PowerShell script that is going to interpret a mail's body for command's and create a .bat file to execute the commando's it found.
This script works, but the one big issues is that whenever is executes the .bat file, a command-prompt window flashes over the screen real quick. I was wondering if it's possible to prevent this from happening?
My code:
$m.Body | Out-File cmd.bat -Encoding ascii -Append
.\cmd.bat | Out-File results.txt
Is there any command of property i have to set? Thanks.