IT Pros – The KB Location

Windows Powershell – “Running scripts is disabled on this system”

Windows Powershell –“Running scripts is disabled on this system”

Powershell scripts can be run on any Windows system as long as they are run from the ISE by pushing the green play button but as soon as you want to run it from the cmd or the desktop file you’ll get hit by an error:

script1.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170

This error happens due to a security measure which won’t let scripts be executed on your system without you having approved it. You can do so by opening up a powershell with administrative rights (search for powershell in the main menu and select Run as administrator from the context menu) and entering:

set-executionpolicy remotesigned

 

 

Exit mobile version