Erwin Bierens

Knowledge is Power

Execution of Scripts is Disabled on this System

2017-03-07 1 min read Powershell Erwin Bierens

Execution of Scripts

When you try to run a powershell script on Windows, you may receive the following error stating that the execution policy on your computer does not allow you to run the script.

To fix this error, you must change the PowerShell execution policy for this computer.  These instructions will explain how to allow “Unrestricted” access to running scripts on your computer.

  1. To set the execution policy to unrestricted, enter the following command (PowerShell must be run as an Administrator):

     Set-ExecutionPolicy Unrestricted
    
  2. You will receive a warning indicating that you are trying to change the execution policy and the risk that is associated with the change.  Enter ‘Y’ and press enter.

  3. Your execution policy is now changed.  You can verify this by executing the command “Get-ExecutionPolicy”.  You can now try to run your script again and you should not receive any errors.

comments powered by Disqus