I often run different “self made” scripts to automate various processes, and to be honest, I often get red text after running scripts and it always suprises me. :D So, this article is little reminder for future me.
One of the errors I often get is File C:\SomeFile.ps1 cannot be loaded because running scripts is disabled on this system.
Solution is simple.
In powershell run following command
Set-ExecutionPolicy Unrestricted
I often choose Yes to All
Command is successful
And after that your script should be able to run (that is, if you syntax is correct)