Torna al Blog

    Enabling execution of PowerShell PS1 scripts

    24 febbraio 2015

    If you try to run a PowerShell script and get the following error:

    File “xxx.ps1” cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.

    it means that the execution policy of the system does not allow running .ps1 files. To run PowerShell scripts you must first change it.

    Launch PowerShell as Administrator and type:

    Set-ExecutionPolicy Unrestricted

    Reply Y to the confirmation prompt, and there you go.

    If you prefer a less permissive setting, RemoteSigned allows local scripts to run while still requiring a signature for scripts downloaded from the Internet.