If you get an error like “execution of scripts is disabled on this system.” while you are trying to execute any script command on powershell…Following solution maybe help you to solve it…
When you try to execute powershell script and following situation happend ;
File C:\scripttest\powershelltest.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-
help about_signing” for more details.
At line:1 char:19
+ c:\scripttest\powershelltesttest.ps1 <<<<
You should try the following command to eliminate the situation ;
Set-ExecutionPolicy RemoteSigned
You will get the following message ;
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust.
Changing the execution policy might expose you to the security risks described
in the about_Execution_Policies help topic. Do you want to change the execution
policy?
[Y] Yes [N] No [S] Suspend [?] Help (default is “Y”): Y
After the selection “YES” then you will be able to execute your script.
You can find an example screen about the situation
Good Luck…