PowerShell is a powerful tool in Windows 11 that allows users to automate tasks, manage system settings, and run advanced scripts. However, by default, Windows restricts the execution of PowerShell scripts for security reasons. If you’ve tried running a .ps1 script and got an error like “cannot be loaded because running scripts is disabled on this system,” you’re not alone.
This guide will show you how to enable PowerShell scripts on Windows 11 step by step, explain why this feature is restricted, and share best practices for safe script execution.
Why Are PowerShell Scripts Disabled by Default?
Windows 11 disables PowerShell script execution by default to prevent unauthorized scripts from running, which could pose security risks like malware or malicious automation.
By enabling script execution, you gain more control but also take on more responsibility for what runs on your system.
Understanding PowerShell Execution Policies
Before enabling scripts, you need to understand Execution Policies. They control what kind of PowerShell scripts are allowed to run.
Types of Execution Policies:
-
Restricted (Default) – No scripts allowed.
-
AllSigned – Only scripts signed by a trusted publisher are allowed.
-
RemoteSigned – Local scripts run; downloaded scripts need to be signed.
-
Unrestricted – All scripts run, but warnings appear for downloaded scripts.
-
Bypass – No restrictions or warnings.
Method 1: Enable PowerShell Scripts via PowerShell (Recommended)
Steps:
-
Open PowerShell as Administrator
-
Press Windows + X → Select Windows Terminal (Admin).
-
-
Check Current Execution Policy
-
Set New Policy (e.g., RemoteSigned)
-
Confirm the Change
-
Type Y and press Enter.
-
-
Verify the Change
Now you can run your scripts safely.
Method 2: Enable PowerShell Scripts via Windows Terminal
Since Windows 11 integrates Windows Terminal, you can do the same steps above directly in Terminal by choosing PowerShell profile.
Method 3: Enable Scripts for a Single Session Only
If you don’t want to permanently change your policy:
-
Open PowerShell.
-
Run:
-
Run your script.
Once you close PowerShell, the policy resets.
Method 4: Enable Scripts via Group Policy Editor (Windows 11 Pro/Enterprise)
-
Press Windows + R → Type
gpedit.msc→ Enter. -
Navigate to:
Computer Configuration → Administrative Templates → Windows Components → Windows PowerShell -
Double-click Turn on Script Execution.
-
Select Enabled.
-
Choose the policy: Allow all scripts or Allow local scripts and signed remote scripts.
-
Click Apply → OK.
Method 5: Enable Scripts via Registry Editor (Advanced)
Warning: Editing the registry can harm your system if done incorrectly.
-
Press Windows + R → Type
regedit. -
Go to:
-
Double-click ExecutionPolicy.
-
Set the value to your preferred policy (e.g.,
RemoteSigned).
Best Practices for Running PowerShell Scripts
-
Only run scripts from trusted sources.
-
Use RemoteSigned for a balance of security and flexibility.
-
Avoid using Unrestricted or Bypass unless absolutely necessary.
-
Always test scripts in a safe environment before running them on a live system.
How to Revert Back to Default Settings
If you want to disable script execution again:
-
Open PowerShell (Admin).
-
Run:
This restores default protection.
Troubleshooting Common Issues
-
“Execution Policy Change Not Taking Effect”
-
Restart PowerShell or your PC after making changes.
-
-
“Access Denied” Error
-
Make sure you run PowerShell as Administrator.
-
-
Downloaded script still blocked?
-
Right-click the file → Properties → Check Unblock.
-
Final Thoughts
Enabling PowerShell scripts in Windows 11 unlocks a whole new level of automation and productivity. Whether you’re a developer, IT admin, or advanced user, knowing how to configure execution policies safely ensures you can run scripts without compromising security.
FAQs
1. Is it safe to enable PowerShell scripts?
Yes, if you use trusted scripts and avoid unknown sources.
2. Which execution policy is best?
RemoteSigned is the most recommended balance between security and usability.
3. Can I enable scripts without admin rights?
Only for the current session using -Scope Process.
4. Does enabling scripts affect all users?
Only if you set the policy at the LocalMachine level.
5. Can I disable script execution after using it?
Yes, just reset it to Restricted.