Wednesday, February 26, 2014

Power Shell - Error - File cannot be loaded. PSSecurityException.

Exception
File D:\Downloads\AMLM_Module_Builds \AML_Module_1.4.2_hotfix_1.4.2.13\DeployAMLM.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:17
+ .\DeployAMLM.ps1 <<<<
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException


Solution-01:
To run unsigned scripts that you write on your local computer and signed scripts from other users, use the following command to change the execution policy on the computer to RemoteSigned:
            set-executionpolicy remotesigned


No comments: