If you see “cannot be loaded because running scripts is disabled on this system” when you run a PowerShell script (.ps1) on Windows 11, PowerShell’s execution policy is blocking it. By default, Windows 11 client PCs use the Restricted policy, which lets you type commands but not run script files. This guide shows how to allow scripts safely, only for your account or only for one session, and how to turn the protection back on.
Quick Answer
Open PowerShell and run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. Type Y if prompted. Local scripts now run, while scripts downloaded from the internet must be signed or unblocked first.

Understand Execution Policies
| Policy | What it allows |
|---|---|
| Restricted | No scripts; individual commands only (Windows client default) |
| AllSigned | Only scripts signed by a trusted publisher |
| RemoteSigned | Local scripts run; downloaded scripts must be signed (recommended) |
| Unrestricted | All scripts, with a warning for downloaded ones |
| Bypass | Nothing blocked, no warnings (for automation) |
Execution policy is a safety feature, not a security boundary. It helps prevent accidentally running scripts, but it doesn’t stop a determined attacker.
Method 1: Allow Scripts for Your Account (Recommended)
- Right-click Start and open Terminal (PowerShell). Admin rights aren’t needed for this scope.
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Confirm with Y if asked.
- Check it:
Get-ExecutionPolicy -Listshould show CurrentUser RemoteSigned.
Method 2: Use the Windows 11 Settings Toggle
- Open Settings > System > For developers.
- Expand PowerShell and turn on Change execution policy to allow local PowerShell scripts to run without signing. Remote scripts still need signing.
This applies the RemoteSigned policy. The option’s location may vary between Windows 11 versions.
Method 3: Allow Scripts for One Session Only
- In an open window:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process. It resets when you close the window. - For a single script:
powershell -ExecutionPolicy Bypass -File .\setup.ps1
Method 4: All Users (Administrator)
Open Terminal as administrator and run Set-ExecutionPolicy RemoteSigned -Scope LocalMachine. Use this only if every user on the PC needs to run scripts.
Run a Downloaded Script
With RemoteSigned, scripts downloaded from the internet are blocked until you unblock them. After confirming the script is from a trusted source and reviewing its contents:
- Run
Unblock-File -Path .\script.ps1, or - Right-click the file, choose Properties, check Unblock, and click OK.
Turn Protection Back On
Run Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope CurrentUser (or Undefined to fall back to the default).
Troubleshooting
- “Windows PowerShell updated your execution policy successfully, but the setting is overridden”: a Group Policy (MachinePolicy or UserPolicy) takes precedence. On work PCs, ask IT.
- Access denied for LocalMachine: open Terminal as administrator, or use
-Scope CurrentUserinstead. - Still blocked: the file may be marked as downloaded. Use Unblock-File.
- PowerShell 7: it has its own policy settings; run the same commands in PowerShell 7 (
pwsh).
Frequently Asked Questions
Is RemoteSigned safe?
It’s Microsoft’s default for Windows Server and a reasonable balance for most users. Only run scripts you trust.
Does this affect batch (.bat) files?
No. Execution policy only applies to PowerShell scripts.
Summary
- Run
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. - Or turn on the PowerShell option in Settings > System > For developers.
- Use
-Scope Processor-ExecutionPolicy Bypassfor one-time runs. - Unblock trusted downloaded scripts with Unblock-File.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.