Quick answer: Running scripts is disabled on this system means the effective PowerShell execution policy is Restricted, the default on Windows clients when nothing else is set. Run Get-ExecutionPolicy -List, then Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. If MachinePolicy or UserPolicy is defined, Group Policy wins and must be changed there.
Running scripts is disabled on this system is one of the first errors almost every Windows admin meets, and I still hit it regularly: a fresh Windows 11 laptop, a jump box nobody has scripted on yet, or a developer whose npm command suddenly fails inside VS Code. The script is fine; PowerShell just refuses to load it. The quick fix you see everywhere is Set-ExecutionPolicy Unrestricted, and that is the one I avoid. Below is the order I use instead, including how to spot a Group Policy override.
What Running Scripts Is Disabled on This System Looks Like
The full message names the file and points to the about_Execution_Policies help topic. The part people search for is cannot be loaded because running scripts is disabled, and it looks like this in Windows PowerShell 5.1:
.\Get-DiskReport.ps1 : File C:\Scripts\Get-DiskReport.ps1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccessCode language: JavaScript (javascript)
The same text appears for profile scripts and module files, so a new PowerShell window can throw it at startup before you type anything.
Why Does PowerShell Say Running Scripts Is Disabled on This System?
PowerShell’s execution policy decides whether script files may run. According to Microsoft Learn, when no policy is set in any scope the effective policy is Restricted on Windows clients and RemoteSigned on Windows Server. Restricted permits individual commands but blocks all script files, including .ps1, .psm1 and .ps1xml. So a brand-new Windows 10 or Windows 11 machine shows running scripts is disabled on this system out of the box, while a server usually does not.
One thing Microsoft states clearly, and I wish more blog posts repeated: the execution policy is not a security boundary. A user can paste the script content into the console and run it anyway. It is a guardrail that stops people from running scripts by accident. That matters for the fix, because the goal is a sensible guardrail, not removing it.
The policy can be set in five scopes, checked in this order of precedence:
| Scope | Set by | Where it is stored (Windows PowerShell 5.1) |
|---|---|---|
| MachinePolicy | Group Policy (computer) | Group Policy, overrides everything below |
| UserPolicy | Group Policy (user) | Group Policy |
| Process | -ExecutionPolicy or -Scope Process | $Env:PSExecutionPolicyPreference, gone when the session closes |
| CurrentUser | Set-ExecutionPolicy -Scope CurrentUser | HKCU:\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell |
| LocalMachine | Set-ExecutionPolicy (default scope, needs admin) | HKLM:\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell |
PowerShell 7 (pwsh.exe) on Windows stores the CurrentUser and LocalMachine settings in powershell.config.json files instead of the registry. In practice that means Windows PowerShell 5.1 and PowerShell 7 can have different policies on the same machine. If a script runs in one shell and not in the other, this is why.
How Do I Fix Running Scripts Is Disabled on This System?
Here is the order I follow. It takes a minute and avoids the two classic mistakes: loosening the whole machine, and changing a setting that Group Policy silently overrides.

Step 1: Read every scope with Get-ExecutionPolicy -List
Do not change anything before you know which scope is winning:
Get-ExecutionPolicy -List
Get-ExecutionPolicy # the effective policy for this sessionCode language: PHP (php)If every line says Undefined, you are on the Windows client default (Restricted) and Step 3 will fix it. If MachinePolicy or UserPolicy shows a value, go to Step 2 first, because nothing you set locally will beat it.
Step 2: Check for an execution policy overridden by Group Policy
When an execution policy overridden by Group Policy is the cause, Set-ExecutionPolicy still reports success for the local scope but adds a warning. Microsoft’s documentation shows this text: PowerShell updated your local preference successfully, but the setting is overridden by the Group Policy applied to your system. The effective policy does not change.
The setting behind it is Turn on Script Execution under Administrative Templates\Windows Components\Windows PowerShell, in both Computer Configuration and User Configuration. Disabled means scripts do not run (equivalent to Restricted). Enabled lets the admin pick Allow only signed scripts (AllSigned), Allow local scripts and remote signed scripts (RemoteSigned) or Allow all scripts (Unrestricted). Computer settings beat user settings. To find which GPO sets it, I run:
gpresult /h "$env:TEMP\gpresult.html"
Start-Process "$env:TEMP\gpresult.html"Code language: JavaScript (javascript)Search the report for Turn on Script Execution and note the winning GPO. The fix then belongs in that GPO (or a more specific one for your admin machines), followed by gpupdate /force. Do not try to delete the policy registry values by hand: the next Group Policy refresh writes them back, and you have only hidden the problem.
Step 3: Set RemoteSigned for the current user
If no Group Policy is involved, this is the fix I use for running scripts is disabled on this system on almost every workstation. It needs no admin rights and only affects your own account:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserCode language: JavaScript (javascript)The short form Set-ExecutionPolicy RemoteSigned -Scope CurrentUser does the same. The change is effective immediately; you do not need to restart PowerShell. RemoteSigned runs scripts you write locally without a signature, but requires a trusted signature on scripts downloaded from the internet. That is the same default Windows Server uses, which is why I consider it a reasonable baseline for admin workstations.
If every user on the machine needs it (a shared jump server, for example), set the LocalMachine scope from an elevated window instead:
# Run as administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachineCode language: PHP (php)Remember that a CurrentUser value takes precedence over LocalMachine. If a user still sees running scripts is disabled on this system after you set LocalMachine, check whether their CurrentUser scope says Restricted.
Step 4: Unblock downloaded scripts instead of lowering the policy
With RemoteSigned in place, a script you downloaded from GitHub or received by email can still fail, this time with is not digitally signed. Windows marks downloaded files with a Zone.Identifier alternate data stream. Read the script first, then remove the mark with Unblock-File:
# Find blocked files in the current folder
Get-Item * -Stream 'Zone.Identifier' -ErrorAction SilentlyContinue
# Unblock one script after you have reviewed it
Unblock-File -Path .\Get-DiskReport.ps1Code language: PHP (php)Unblock-File does not change the execution policy; it only clears the internet mark on that file. Microsoft also notes that files downloaded with curl.exe, Invoke-WebRequest or Invoke-RestMethod may not get the mark at all, so do not assume a script is safe just because it runs.
Run One Script Without Changing the Policy
For a one-off job, a scheduled task or a deployment tool, I prefer to set the policy only for that process. Nothing is saved, the machine keeps its normal policy, and running scripts is disabled on this system does not appear for that run:
powershell.exe -ExecutionPolicy Bypass -File C:\Scripts\Get-DiskReport.ps1
# Or only for the console you are in right now
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope ProcessCode language: PHP (php)The Process scope beats CurrentUser and LocalMachine, but it does not beat Group Policy. If an AllSigned or Restricted GPO is in place, -ExecutionPolicy Bypass on the command line will not get you past it, and that is by design.
Common Cases and the Fix I Use
| Symptom | Likely cause | Fix |
|---|---|---|
| New Windows 11 PC shows running scripts is disabled on this system | No policy set, client default is Restricted | Set-ExecutionPolicy RemoteSigned -Scope CurrentUser |
npm or another tool fails in VS Code terminal with npm.ps1 cannot be loaded | The tool ships a .ps1 shim and the policy is Restricted | Same CurrentUser fix, or call npm.cmd |
| Set-ExecutionPolicy warns about an override | Turn on Script Execution GPO | Change the GPO, then gpupdate /force |
| Works in Windows PowerShell, fails in pwsh | Separate policy storage for PowerShell 7 | Run the same Set-ExecutionPolicy inside pwsh |
| Downloaded script is not digitally signed | RemoteSigned plus Zone.Identifier mark | Review it, then Unblock-File |
How to Verify the Fix
Open a new PowerShell window so you test what users will see, then run the list again and start the script that failed:
Get-ExecutionPolicy -List
.\Get-DiskReport.ps1Code language: CSS (css)
The scope you changed should show RemoteSigned, the effective policy should match it, and the script should run without running scripts is disabled on this system appearing again. On a domain machine, also run gpupdate /force and check once more, so you know a policy refresh will not undo it.
Why I Do Not Recommend Unrestricted
Unrestricted lets unsigned scripts run and only warns about files that are not from the local intranet zone. It makes running scripts is disabled on this system disappear, but it also removes the check that stops a user from double-clicking their way into a script from a phishing email. If your PowerShell execution policy November 2026 audit finds machines set to Unrestricted or Bypass at LocalMachine scope, I would move them back to RemoteSigned and keep Bypass only on the command lines that truly need it.
Read more: PackageManagement is currently in use: the proven Install-Module fix.
Read more: Install-Module not working? Fix NuGet and TLS 1.2 errors, the next error you often meet right after scripts start running.
Read more: AD drive does not exist in PowerShell: the easy fix for Get-Acl errors.
What this one taught me: when running scripts is disabled on this system, the error is not a bug to switch off. Read the list, respect Group Policy, set the narrowest scope that works, and unblock individual files you trust.
FAQ
Why does PowerShell say running scripts is disabled on this system?
Because the effective execution policy is Restricted. On Windows clients this is the default when no policy is set in any scope, so script files (.ps1, .psm1, profile scripts) are blocked while single commands still work.
Is Set-ExecutionPolicy RemoteSigned -Scope CurrentUser safe?
For most workstations, yes. It only affects your account, needs no admin rights, runs local scripts and requires a trusted signature on downloaded scripts. It is the same policy Windows Server uses by default.
Why does Set-ExecutionPolicy not change anything?
Either a Group Policy (MachinePolicy or UserPolicy) overrides it, or a higher-precedence scope such as Process or CurrentUser still holds a different value. Run Get-ExecutionPolicy -List to see which scope wins.
Can I run a script when running scripts is disabled on this system without changing the policy?
Yes. Start it with powershell.exe -ExecutionPolicy Bypass -File script.ps1, or use Set-ExecutionPolicy -Scope Process. The setting lasts only for that process, and it cannot override a Group Policy setting.
Does the execution policy apply to PowerShell 7 separately?
Yes. Windows PowerShell 5.1 stores the policy in the registry, while PowerShell 7 on Windows uses powershell.config.json files, so set the policy in each shell you use. Group Policy can manage both.
References
Microsoft Learn: about_Execution_Policies (Windows PowerShell 5.1)
Microsoft Learn: about_Execution_Policies (PowerShell 7.5)
Microsoft Learn: Set-ExecutionPolicy
Microsoft Learn: Unblock-File
Microsoft Learn: about_Group_Policy_Settings






