4 Ways to Fix the Windows “PowerShell Cannot Be Loaded Because Running Scripts Is Disabled” Error

You’re running some commands on PowerShell and suddenly see an error message that reads, “PowerShell cannot be loaded because running scripts is disabled on this system.”

Wondering what causes this issue and how you can resolve it? We’ll take you through the easy methods that can help you tackle this issue once and for all.

4

Let’s dive in!

1. Run PowerShell in Administrator Mode

Are you currently running PowerShell without proper administrative rights? If so, then perhaps that’s where the issue lies.

So, let’s explore the steps you should apply to run the tool in administrator mode:

Person typing commands on a PC

And if that doesn’t help, check outthe various ways to open Windows PowerShell. But you should only focus on the methods that show you how to run the tool with administrative privileges.

2. Change the Execution Policy in PowerShell

In some instances, changing the execution policy could help. But before we explore the solutions, let’s first take you through what the execution policy is and how it works.

What Is the Execution Policy, and How Does It Work?

The execution policy is a security feature that controls the way you run PowerShell scripts on your device. It simply determines which types of scripts can be run and which ones should be avoided. The best part is that you may configure this policy to your liking.

Here are the options you can pick from when configuring the execution policy:

Selecting the Windows PowerShell (Admin) option on the Quick Access Menu

Now, if you use PowerShell regularly, then you might want to change the execution policy from time to time. However, some execution policies might display error messages when you run your PowerShell scripts.

For example, enabling the “Restricted,” “AllSigned,” or “RemoteSigned” policies might lead to error messages like the “running scripts is disabled” error.

Displaying the list of execution policies

To resolve the problem, you’d simply have to change the execution policy to “Unrestricted” or “ByPass.” But that’s not all; you’d also need to decide how the policy should be implemented. For example, do you want to apply the policy for all users or just for your current PowerShell session?

Let’s explore all the additionalPowerShell commandsyou’ll have to add when changing the execution policy:

Setting the execution policy on PowerShell

Now that everything is clear, let’s explore how you can execute the relevant policies to tackle the “PowerShell cannot load” issue.

How to Change the Execution Policy to “Unrestricted”

The best way to tackle the issue at hand is to change the execution policy to “unrestricted.” But before that, you need to check how each execution policy is configured.

Here are the steps for checking how the execution policies are configured:

This should show you how the execution policies are configured for different users and systems.

To can change the execution policy to “Unrestricted” for the current active user, type the following command and pressEnter:

To change the execution policy to “Unrestricted” for all users, type the following command and pressEnter:

When you finish running the command, close PowerShell and restart your PC to save these changes.

How to Change the Execution Policy to “ByPass”

The “ByPass” execution policy will allow you to run any PowerShell script without a hassle. But remember that it might also allow you to run buggy files. So, always configure this execution policy only when running trustworthy PowerShell files.

To change the execution policy to “ByPass” for the current active user, type the following command and pressEnter:

And to change the execution policy to “ByPass” for all users, type the following command and pressEnter:

When you finish, close PowerShell and then restart your device.

3. Change the Execution Policy Via the Local Group Policy Editor

The Local Group Policy Editor (LGPE) also makes it easy for you to change the execution policy. In fact, this tool can also help you configure various system settings or troubleshoot tons of PC issues.

Remember, the main aim is to change the execution policy such that you’ll be able to run your PowerShell scrips without a hassle. And by so doing, you’ll get rid of the “running scripts is disabled” error on PowerShell.

Here’s how to change the execution policy in the LGPE:

Check theEnabledbox. From there, click theExecution Policydrop-down menu and selectAllow local scripts and remote signed scripts. This option is similar to the “RemoteSigned” option that we discovered earlier.

If you want to run all scripts without restrictions, pick theAllow all scriptsoption from the “Execution Policy” drop-down menu.

From there, clickApplyand then clickOKto save these changes.

4. Change the Execution Policy Using the Registry Editor

If the other methods didn’t help, then try changing the execution policy using the Registry Editor. However, you need to be careful when editing Registry keys. If you tweak the wrong keys, then you might end up damaging your PC.

Now, here’s how to change the execution policy via the Registry Editor:

Locate theExecutionPolicyvalue on the right-hand side.

If the value is missing, create it through these steps:

Double-click on theExecutionPolicyvalue. Next, typeRemoteSignedin the “Value data” section. This will allow PowerShell to execute local and signed scripts.

Alternatively, typeByPassin the “Value data” section. This will allow PowerShell to execute any script without limitations.

After entering your preferred value in the “Value data” section, pressOKto save the changes. Finally, close the Registry Editor and then restart your device.

Run Your PowerShell Scripts Without Any Restrictions

It can be quite frustrating when you suddenly can’t execute certain commands on Windows PowerShell. But if you come across the “scripts is disabled” error, the solutions we’ve covered should help.

Now, does PowerShell often give you other issues? Well, there are more solutions that can help you out.

If PowerShell is doing more harm than good, here’s how to fix it if it starts giving you error messages.

My foolproof plan is to use Windows 10 until 2030, with the latest security updates.

Not Linux, not Windows. Something better.

Your iPhone forgets what you copy, but this shortcut makes it remember everything.

Unlock a world of entertainment possibilities with this clever TV hack.

Free AI tools are legitimately powerful; you just need to know how to stack them.

Technology Explained

PC & Mobile