Setting Execution Policy

Powershell scripts require unrestricted execution policy to be set to execute. By default this is disabled and is the correct choice. Once you’ve executed scripts, you must manually reset this to restricted or you leave yourself open to bad things. This persists across sessions.

Check and set unrestricted policy (powershell as admin).
Set-ExecutionPolicy -ExecutionPolicy unrestricted -Force
Set restricted policy (powershell as admin).
Set-ExecutionPolicy -ExecutionPolicy restricted -force

Set Policy Via Script

Commands entered directly into powershell are executed. Scripts may be run without setting execution policy by launching a sub-shell with ExecutionPolicy bypassed.

Execute script without setting ExecutionPolicy.
PowerShell.exe -ExecutionPolicy Bypass -File {SCRIPT}.ps1


  1. Setting Execution Policy

  2. Powershell Scripts Disabled