Change PowerShell Execution Policy
Published: December 12, 2025
PowerShell’s execution policy controls whether scripts are allowed to run on your Windows system. On many systems, scripts that originate from the internet are blocked or require a trusted signature, which can prevent legitimate local or development scripts from running. We will review how to get the current execution policy and how to change it.
-
Open a PowerShell terminal as an administrator (right-click → “Run as administrator”) if you intend to change the machine-wide policy. For per-user changes an administrator elevation is not required.
-
Check the current execution policy:
Get-ExecutionPolicy
- To change the execution policy for the current user (recommended over changing the machine policy), run:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
Alternatively, consider the safer RemoteSigned policy which allows local scripts to run but requires downloaded scripts to be signed:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
CAUTION: Changing the execution policy can reduce system security. Unrestricted will allow unsigned scripts to run — proceed at your own risk. If possible, prefer RemoteSigned or limit scope to the current user.
If you want to run a single script without changing policy, you can unblock that file (if it was downloaded) with PowerShell:
Unblock-File -Path .\script.ps1
That’s it — after adjusting the policy you should be able to run local scripts as needed.
Keep moving forward!