Saturday, September 29, 2012

ps1 cannot be loaded because the execution of scripts is disabled on this system


If your powershell script failed test.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
1. First run the powershell command
Get-ExecutionPolicy
You will see Restricted; if then

2. Enable powershell to run the below
Set-ExecutionPolicy RemoteSigned

You will see RemoteSigned:

Your powershell  script will work now onwards

No comments: