Batch file output to Log file

When running a batch file it might be beneficial and necessary to have a log file detailing the status of the commands. While there are different ways around creating a log file, batch file redirection is the key. To explain redirection lets see this example of a batch file that

The execution of scripts is disabled on this system; error in PowerShell

File NAME.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details. You will get this error when the default execution policy is enable, which is Restricted: Does not load configuration files or run scripts. There are six