How to Change PowerShell Execution Policy on Windows: Step-by-Step Guide
If you’ve ever tried running a PowerShell script and saw the error message “running scripts is disabled on this system”, you’re not alone. This message appears because PowerShell’s default execution policy is set to Restricted, which blocks all scripts from running for safety reasons. The good news is that this isn’t a serious error — and this article will show you exactly how to fix it.
In this step-by-step guide, you’ll learn how to change PowerShell’s execution policy from Restricted to RemoteSigned or Unrestricted, understand what each level means, and see how to apply these settings safely. We’ll also cover how this applies to the new cross-platform version of PowerShell, known as PowerShell Core.
Understanding PowerShell Execution Policies
The Execution Policy is a safety feature that determines which PowerShell scripts are permitted to run. It helps prevent accidental execution of untrusted scripts on your PC.
- Restricted — No scripts are allowed. This is the default on many Windows systems.
- AllSigned — Only scripts signed by a trusted publisher run.
- RemoteSigned — Local scripts run; downloaded scripts must be signed by a trusted publisher.
- Unrestricted — All scripts run; remote scripts show a one-time warning.
Step-by-Step: Change the Execution Policy
Step 1 — Open PowerShell as Administrator
- Press Start, type PowerShell.
- Right-click Windows PowerShell (or
pwshfor PowerShell Core) and choose Run as Administrator. - You should see a prompt similar to:
PS C:\WINDOWS\system32>
Step 2 — Check the current policy
Run:
Get-ExecutionPolicy
Expected output (default on many systems):
Restricted
Step 3 — Set Execution Policy to RemoteSigned
Run this command to allow local scripts and require signing for downloaded scripts:
Set-ExecutionPolicy RemoteSigned
PowerShell will show a confirmation prompt:
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
Type Y and press Enter to confirm.
Step 4 — (Optional) Set to Unrestricted
If you want to allow all scripts (not recommended for production systems), run:
Set-ExecutionPolicy Unrestricted
Confirm with Y when prompted.
Step 5 — Verify the change
Run:
Get-ExecutionPolicy
Example expected output after setting to unrestricted:
Unrestricted
Security Considerations
Warning: Setting the execution policy to Unrestricted or otherwise loosening policies increases risk. Execution policies are a convenience/security layer but not a replacement for endpoint protection or code review.
- Prefer
RemoteSignedfor developer machines where you run local scripts you control. - Use
AllSignedfor production systems that require higher assurance. - Only run scripts from trusted sources; inspect any downloaded script before executing it.
- Combine execution policy with code signing, antivirus, and least privilege principles.
Quick Reference
| Command | Purpose | Example Output |
|---|---|---|
Get-ExecutionPolicy | Check current policy | Restricted |
Set-ExecutionPolicy RemoteSigned | Allow local scripts; require signing for remote | Interactive confirmation |
Set-ExecutionPolicy Unrestricted | Allow all scripts (use with caution) | Interactive confirmation |
PowerShell Across Platforms
The cross-platform PowerShell core binary is pwsh. Installers and documentation are available at:
Once installed, on Linux/macOS, you can run pwsh and use the same commands shown in this guide.
Conclusion
PowerShell execution policies help balance safety with script convenience. For most development scenarios, RemoteSigned is a sensible default; choose AllSigned or keep Restricted if you need stricter control. Only use Unrestricted when you understand the risks and have compensating security controls in place.
For official documentation, visit: about_Execution_Policies.
More Articles
How to Build a High-Performing Website on a Budget
3 weeks ago · 4 min read
From Traffic to Profit The Complete Website Conversion Framework for 2025
1 month ago · 4 min read
5 Hidden Website Optimization Secrets That Big Brands Use to Dominate Online (And Why You Haven’t Heard of Them)
1 month ago · 4 min read
Website Funnels 101 — How to Turn Clicks into Clients Automatically
1 month ago · 4 min read
How to Build a Website That Sells Before You Even Launch (2025 Guide)
1 month ago · 5 min read
Why Most Business Websites Fail — And How to Build One That Actually Works in 2025
1 month ago · 3 min read
The Secret Behind Websites That Convert 10× Better — Proven Website Strategies for 2025
1 month ago · 3 min read
Website Strategy 2025: Proven Tactics Top Brands Use to Build High-Converting Websites
1 month ago · 2 min read
Essential Types of Websites Every Business Owner Needs in 2025
1 month, 1 week ago · 3 min read
Tech Courses You Should Take in 2025 to Stay Ahead
1 month, 1 week ago · 4 min read
x