Home » How To » 3 Fixes for ‘Running Scripts Is Disabled on This System’ Error on Windows 11

3 Fixes for ‘Running Scripts Is Disabled on This System’ Error on Windows 11

If you are encountering the script cannot be loaded because running scripts is disabled on this system error while executing PowerShell scripts or commands on Windows 11, you are not alone. The good news? Simply changing the execution policy to RemoteSigned fixes it. In this tutorial, we’ll show three ways to do it. You can choose the method that’s easiest for you. Let’s get started.

running scripts is disabled on this system error

Why Am I Getting This Error?

This error occurs because of Windows 11’s built-in security measures. By default, Windows 11 sets the PowerShell execution policy to ‘Restricted.’ This is the most secure setting and does not allow any PowerShell scripts to run, regardless of their origin—whether the script is created by you or downloaded from the Internet.

When you want to run a PowerShell script, you have to change the PowerShell execution policy to RemoteSigned (preferred).

Method 1: Bypass Execution Policy

If you only run PowerShell scripts occasionally, you don’t have to change the current execution policy. You can simply bypass it so that you will not encounter the running scripts is disabled on this system error.

To do this, execute the following command. Don’t forget to replace the dummy file path with the actual path to the PS script.

powershell -ExecutionPolicy Bypass -File "C:\path\to\script.ps1"

bypass execution policy command

Method 2: Using the Settings App

On Windows 11, open the Settings window by pressing the Windows key + I shortcut. Once it opens, navigate to the System > For Developers page.

click on for developers

Scroll down, click on the PowerShell option, and turn on the Change execution policy to allow local PowerShell scripts to run without signing. Require signing for remote scripts toggle. Turning this on will change the PowerShell execution policy to ‘RemoteSigned,’ allowing you to run local scripts.

turn on script execution option

That’s it! The error should now be fixed, and you can run PowerShell scripts without a problem.

error fixed and you can now run PowerShell scripts

Optional: Once you’re done using PowerShell, you might want to go back to the Settings app and turn off the change in execution policy. This ensures that no one can run scripts on your system without your knowledge.

Method 3: Using a PowerShell Command

Start by pressing Windows key + X and choosing Terminal (Admin) to open Terminal with admin rights.

By default, the Terminal should open with the PowerShell tab. If not, click on the downward arrow icon and select Windows PowerShell. In the terminal window, run the following command to change the execution policy to RemoteSigned.

Set-ExecutionPolicy RemoteSigned

In case you get the Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Restricted. error, run the following command. All the below command does is set the scope to the current user.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

That’s it. You can now run PowerShell scripts without errors.

Optional: Just as with the Settings method, it is a good security practice to change the ExecutionPolicy back to Restricted, especially if you only run scripts occasionally. To reset the execution policy, run Set-ExecutionPolicy Restricted.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top