Powershell Error: ps1 cannot be loaded because running scripts is disabled on this system
Run the below command to enable running of scripts
SetExecutionPolicy -ExecutionPolicy Unrestricted -Force
If you are running from an 64-bit Machine, ensure you run this on both versions of Powershell including the x86 version
Advertisements
Posted on February 27, 2014, in Powershell and tagged unable to run powershell scripts. Bookmark the permalink. 1 Comment.
When I am applying above command, I get following error message
Error “SetExecutionPolicy : The term ‘SetExecutionPolicy’ is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.”
Because “-” dash is missing from the command “SetExecutionPolicy”. It should be “Set-ExecutionPolicy”. Following is correct command.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force