PowerShell Scripts Disabled? Fix the Execution Policy

PowerShell's running scripts is disabled on this system message means an execution policy is stopping the script. Start with RemoteSigned for the current session on your own Windows PC.

Unsigned downloads and organization policies need different handling. Check the policy in the terminal showing the error, then choose the matching fix. Administrator access alone doesn't remove a script policy restriction.

1. Read the policy in the terminal that failed

Keep the window that reported the error open. Enter these commands separately:

Get-ExecutionPolicy
Get-ExecutionPolicy -List

The first shows the policy the session is using. The second lists the settings that determine it: MachinePolicy, UserPolicy, Process, CurrentUser, and LocalMachine.

Drawing of a PowerShell window with the Get-ExecutionPolicy commands marked

Restricted allows individual commands but stops scripts. RemoteSigned allows local scripts and requires a trusted signature for internet downloads unless you unblock the file. AllSigned needs trusted signatures even for local scripts.

Undefined means no policy has been set for that scope. It isn't permission to run everything. Another scope, or the Windows default when none is set, determines what the session allows.

MachinePolicy and UserPolicy come from Group Policy, an organization's Windows rules. If either has a policy set, go to the organization-policy section before changing a personal setting. Those rules take priority over the other scopes.

Run these checks inside the failing VS Code terminal too. A separate PowerShell window can use a different policy from an already-open editor terminal, especially when one session has its own Process setting.

2. Allow trusted local scripts for this session

On your own PC, if an organization policy isn't taking priority, enter:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned

Read the confirmation prompt and accept if you want to use this policy. Then run Get-ExecutionPolicy again. It should report RemoteSigned unless a higher-priority policy overrides the change.

Process means the current PowerShell session. Closing it removes the setting, so it's a good choice for running a setup script just once. Changing the Process setting doesn't require an administrator window.

Run your reviewed local script again from its folder. In PowerShell, .\ points to the current folder. Run a file named setup.ps1 as .\setup.ps1, rather than typing only its filename.

If the original disabled-scripts message disappears, the policy was the barrier. A new error about a missing file, module, or permission needs its own repair; allowing more scripts to run won't install a missing component.

I'd start with this temporary scope because it answers the immediate problem without leaving a lasting change. For regular development work on your own account, use the next section instead.

3. Keep the setting for your Windows account

To allow local scripts in future PowerShell sessions for your account, use:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Record the old CurrentUser value from the list first. The command changes your account's preference; it doesn't change every Windows user's setting. Changing LocalMachine would affect the whole PC and requires administrator access.

Microsoft's execution policy instructions explain the scopes and their priority. Process takes priority over CurrentUser, while organization policies take priority over both.

Open a fresh session and check the effective value there. The old window's temporary Process setting can take priority over your CurrentUser change. A fresh session shows which policy future windows will use.

To undo the account change, set CurrentUser back to the value you recorded. If its original value was Undefined, use:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Undefined

Removing your account's setting leaves the other policy settings to decide what runs. It doesn't necessarily restore Restricted, because another scope can supply the effective value.

4. Unblock a reviewed download when RemoteSigned stops it

A message saying the file is not digitally signed means something different from Restricted blocking all scripts. Under RemoteSigned, a downloaded unsigned script can remain blocked even after local scripts start working.

Read the script and verify its publisher and download location before removing its download mark. Unblock-File removes that mark from the selected file; it doesn't inspect the script or make its contents safe.

Use the script's actual path. For example, replace the placeholder in this command with the path to the file you've reviewed:

Unblock-File -LiteralPath 'C:\path\to\reviewed-script.ps1'

Run the script again while the policy is still RemoteSigned. Unblocking doesn't change the execution policy, and it won't satisfy AllSigned, which requires a signature regardless of where a script came from.

Unblock only the file you reviewed. A command that unblocks everything in Downloads would also remove the download mark from scripts you haven't checked.

5. Handle npm and Python activation errors by filename

An npm.ps1 error can appear when you type npm, even though you never typed a script name. The path in the error shows that PowerShell is blocking npm's launcher script. The message isn't reporting a failed package installation.

Likewise, Python virtual-environment activation can stop at Activate.ps1. If the message says running scripts is disabled, check the policy in that same terminal and use the appropriate scope for a trusted local script.

A filename in the message helps separate these cases from a command that Windows can't find. For a missing SSH command, use the SSH command checks instead of changing the script policy.

An unwanted PowerShell window that keeps reopening is another separate problem. The repeating PowerShell popup guide deals with that startup behavior, rather than permission to run a chosen script.

6. Take enforced policies to the administrator

If MachinePolicy or UserPolicy has a policy set, Process or CurrentUser can't override it. PowerShell can save your chosen setting and still report that an organization policy takes priority. The session's policy won't change.

Send IT the full error, the script path, and the output of both Get-ExecutionPolicy commands. Ask whether the script needs a trusted signature or IT has an approved way to run it. Those details help them decide how to allow the task.

Keep RemoteSigned for personal-PC use rather than switching everything to Unrestricted or Bypass. This helps prevent unintended script execution. A script still uses the permissions of the account launching it.

The Short Version

Check Get-ExecutionPolicy and its scope list in the failing terminal. Use Process RemoteSigned for one session or CurrentUser RemoteSigned for your account. Unblock only a reviewed download, and ask IT about enforced organization policies.

Checked December 1, 2026.

If you have any business, I can build it online

Hi, I’m Hamza. I’ve been building websites and online shops for business owners since 2019, and I also built this site you’re reading.

Tell me what business you have or what you’re working on. I’ll look into how much it can grow online, and then we talk. You don’t have to buy anything or hire me first.

Chat with me on my site and I’ll show you proof of businesses I’ve helped and how they’ve grown.

Written by Isaac Smith

Isaac Smith is the founder and editor of PC Glance, a website that covers computers, laptops, and technology. He is a tech enthusiast and a computer geek who loves to share his insights and help his readers make smart choices when buying tech gadgets or laptops. He is always curious and updated about the latest tech trends.

More from Isaac Smith

Leave a Comment