PowerShell Script Execution Disabled? Here's How to Fix It Fast

PowerShell Script Execution Disabled? Here's How to Fix It Fast

Photo by Ferenc Almasi on Unsplash

So you've just written a perfectly good PowerShell script, you double-click it, and Windows throws this at you: "cannot be loaded because running scripts is disabled on this system." It's one of those errors that looks scarier than it is — but it trips up even experienced sysadmins who haven't touched a fresh machine in a while. The PowerShell script execution disabled error is Windows protecting you from yourself, basically, and honestly I get it. But when you're trying to get something done, it's annoying as hell.

Here's what's actually happening under the hood.

PowerShell has something called an Execution Policy — it controls what kinds of scripts are allowed to run on the machine. By default, Windows sets this to Restricted, which means no scripts at all. Not even ones you wrote yourself five minutes ago. This is a security feature, not a bug, and it's worth understanding before you just nuke it and move on.

Check What You're Working With First

Before changing anything, run this to see your current policy:

Get-ExecutionPolicy

If it spits back Restricted, that's your problem. But here's the thing though — you should also check at all scope levels, because group policy can be overriding your local setting without you knowing:

Get-ExecutionPolicy -List

This shows you the policy at every scope: MachinePolicy, UserPolicy, Process, CurrentUser, and LocalMachine. I've wasted a good 20 minutes before wondering why my policy change "wasn't sticking" — turns out a domain GPO at the MachinePolicy level was overriding everything I set locally. Classic.

The Quick Fix (and When to Use It)

For most people running scripts on their own machine, setting the policy to RemoteSigned is the right call. It lets you run local scripts freely, but anything downloaded from the internet has to be digitally signed. Good balance of usability and safety.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Using -Scope CurrentUser means you're only changing it for your own profile, not system-wide. That's the responsible move, especially on a shared or corporate machine. If you're on your personal dev box and you just want things to work, -Scope LocalMachine applies it for everyone on the system — but you'll need to run PowerShell as Administrator for that one.

To do that: right-click the Start menu, hit Windows PowerShell (Admin) or Terminal (Admin) depending on your Windows version, then run:

Set-ExecutionPolicy RemoteSigned

The Nuclear Option (Use With Caution)

Unrestricted removes basically all restrictions. I've seen people recommend this on forums and it makes me twitch every time. It'll run everything — including scripts from the internet with no signing requirement. If you're in a locked-down lab environment or just messing around locally with no external scripts, fine. But don't set this on a production machine and forget about it.

Set-ExecutionPolicy Unrestricted

There's also Bypass, which is similar but doesn't even show warnings. Used a lot in CI/CD pipelines or automated deployments where you control the environment completely.

Insider Trick #1: Bypass Without Changing Any Policy

Here's something a lot of people don't know — you can run a specific script with execution policy bypassed just for that single session, without touching your system settings at all:

PowerShell -ExecutionPolicy Bypass -File "C:\Scripts\MyScript.ps1"

This is super handy when you're running something once, or when you're on a machine you don't want to modify. I use this constantly when I'm deploying scripts on client machines and don't want to mess with their existing policy setup. It doesn't persist, it doesn't change anything — it just runs the script and goes home.

Insider Trick #2: Unblock a Downloaded Script

Even with RemoteSigned set, you might still get blocked on a script you downloaded. That's because Windows marks downloaded files with a hidden "Zone Identifier" tag — basically a flag that says "this came from the internet, be careful." You can strip that flag off with one command:

Unblock-File -Path "C:\Scripts\MyDownloadedScript.ps1"

After that, the script runs like any local file. Alternatively, you can right-click the .ps1 file in Explorer, go to Properties, and check the "Unblock" checkbox at the bottom of the General tab. Same result, more clicks. Up to you.

Worth noting — this is separate from execution policy. People mix these two up all the time. Execution policy is about what category of scripts can run. The Zone Identifier block is about the origin of a specific file. You sometimes need to deal with both.

What If You're on a Domain and Can't Change Anything?

If your organization's Group Policy is locking down execution policy — which you'd see as a MachinePolicy or UserPolicy entry in that Get-ExecutionPolicy -List output — you genuinely can't override it from PowerShell alone. That's by design. You'd need to either talk to your domain admin or use the Bypass flag trick mentioned above as a workaround, assuming that's not also locked down.

Some orgs lock things down hard for compliance reasons, and that's fair. Don't try to work around security policy on a corporate machine without knowing what you're doing and whether it violates policy. I'm not your IT department, but I've been that IT department, and we noticed.

Quick Reference

Here are the execution policy levels from most to least restrictive, just so you've got them in one place:

  • Restricted — No scripts at all (default)
  • AllSigned — All scripts must be signed by a trusted publisher
  • RemoteSigned — Local scripts run freely, downloaded scripts must be signed
  • Unrestricted — Everything runs, warnings on internet scripts
  • Bypass — Everything runs, no warnings whatsoever

For 95% of situations, RemoteSigned at the CurrentUser scope is the answer. It's what I default to on any new machine I set up. Set it, forget it, move on with your life.

Hope this saves you from staring at that error message for the next half hour — I've definitely been there.

Related: PowerShell Execution Policy Explained (And How to Actually Fix It)

๋Œ“๊ธ€

Mojang Session Servers Down? Here's Why You Can't Log Into Minecraft Right Now

Photo by Patrik Kernstock on Unsplash So you sit down to play some Minecraft, probably after a long day, maybe you've got friends waiting in a server lobby, and you get smacked with this: Failed to connect to the server. Error: Authentication servers are down for maintenance. Or sometimes it shows up as: Failed to login: Invalid session (Try restarting your game and the launcher) Yeah. The Mojang session servers are down, or at least they're not talking to your game properly. I've seen this come up constantly in forums and Discord servers whenever there's a Mojang outage, and the frustrating part is — half the time people don't even realize it's not their fault. Here's what's actually going on. Why This Happens Minecraft doesn't just let you waltz into a multiplayer server. Every time you connect, your client reaches out to Mojang's session servers at session.minecraft.net to verify you...

what is art therapy AI painting checker Introducing the AI HTP Test Site: A New Era in Art Therapy

 #what is art therapy #art therapy activities   AI Art Above is the AI ​​picture psychological test. Below is the AI ​​HTP tree human house test.  Psychotherapy test AI Art Psychotherapy HTP test Introducing the AI HTP Test Site: A New Era in Art Therapy What Is HTP? HTP (House-Tree-Person) is a well-known projective drawing test commonly used in art therapy and psychological evaluation. Participants draw a house, a tree, and a person, and mental health professionals interpret these drawings to gain insights into the individual’s emotional state, personality traits, and underlying issues. AI Meets HTP Thanks to advancements in artificial intelligence, the HTP test has evolved. Our AI HTP Test Site allows you to upload your drawings and receive a detailed, automated analysis. The system evaluates various elements—line thickness, spatial arrangement, color usage, and more—to provide immediate, data-drive...

์ด ๋ธ”๋กœ๊ทธ ๊ฒ€์ƒ‰

Zoho Mail IMAP Not Working: Every Fix I've Actually Used

Quick Summary Zoho Mail IMAP stops working for the dumbest reasons - wrong port, 2FA blocking app passwords, or DNS that looks fine but isn't. I've fixed this across Outlook 2016, iPhones, Android, and Mac Mail, and the root cause is almost always one of four things. Here's the exact step-by-step with real menu paths so you're not clicking around for two hours like I was the first time. Photo by Juanjo Jaramillo on Unsplash It was a Monday morning. One of our sales guys walks up and says his Outlook stopped pulling emails from Zoho. Just stopped. Overnight. Nothing changed - or so he said. Checked his machine, checked the account settings, everything looked right on the surface. Port 993, SSL enabled, correct email address. And yet. Nothing. Here's the thing - Zoho Mail IMAP issues have this annoying pattern where the settings look correct but something underneath is broken. Could be an app password that got invalidated when someone toggled 2FA. Could be IMAP ac...
↑