When running some ps1 file in Powershell and you get some error like:
File <Path-to-some-ps1-file>.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
You can solve it by running the following command in Powershell:
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "RemoteSigned"
To reset the policy setting run:
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "AllSigned"
Cheers!.