Fix PowerShell Execution of Scripts Is Disabled On This System
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser to resolve the PowerShell execution of scripts is disabled on this system error. The lasting fix is to understand your security scope requirements.When you try to run a configuration script or automation tool in your terminal, the engine blocks the process. This restriction protects your environment from accidental execution, but it frequently interrupts normal administrative tasks.
Why are my PowerShell scripts not executing?
PowerShell blocks your scripts because execution of scripts is disabled on this system at a level like Restricted. This prevents any local scripts from running. This defense-in-depth feature prevents accidental code execution, though determined users can easily bypass it.

Understanding the underlying policy types helps you choose the correct setting for your environment. PowerShell features seven distinct policy types: Restricted, AllSigned, RemoteSigned, Unrestricted, Bypass, Default, and Undefined (Microsoft Learn). On Windows client computers, Windows PowerShell 5.1 defaults to Restricted, while Windows Server and PowerShell 7 default to RemoteSigned. Non-Windows systems enforce Unrestricted by default and cannot alter this behavior.
How to change the execution policy in PowerShell
To fix the error permanently or for your current user account, you must update the policy using an elevated prompt or specific scope flags. If you target the LocalMachine scope, you need administrative privileges.
-
- Open PowerShell with administrative rights if you plan to change system-wide settings.
- Type
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserand press Enter. - Review the prompt warning you about policy changes and type
Yto confirm. - Run your script again to verify that the system loads and executes the code without errors.
How can I bypass the PowerShell script execution policy?
You can bypass the execution policy for a single session without altering permanent system settings. Passing the Bypass flag during startup achieves this. Type powershell -ExecutionPolicy Bypass -File .YourScript.ps1 in your command prompt to run the file immediately.

The execution policy for a session uses the Process scope, which stores the setting only in memory. Once you close that specific terminal window, the restriction resets to its previous system default automatically.
How to disable powershell script execution
You can lock down your environment again by setting the execution policy back to its most restrictive state. Open an administrative terminal and run Set-ExecutionPolicy Restricted -Scope LocalMachine to prevent any unapproved scripts from running on the system.

Administrators typically use this restriction on shared workstations or production servers where standard users should not execute local automation scripts. Developers balance security and usability by restricting only the scopes that require hardening while leaving machines open via User scopes.
Comparing PowerShell Execution Policy Scopes
You apply execution policies across different hierarchical scopes. PowerShell evaluates these scopes in a specific order, where narrower scopes override broader ones.
-
-
- Process: Applies only to the current PowerShell session and disappears when you close the window.
- CurrentUser: Affects only the logged-in user account by modifying the registry hive under HKCU.
- LocalMachine: Affects every user on the computer and requires local administrator rights to change.
- Group Policy: Overrides all other local scopes through domain controllers or local security policies.
-
When you encounter stubborn errors that ignore your local commands, corporate Group Policy usually enforces a strict setting that you cannot override without domain administrator assistance.
Common problems and fixes when changing policies
You might encounter access denied errors when you attempt to modify the LocalMachine scope. You fix this problem by right-clicking your terminal application and selecting Run as administrator before you run the cmdlet.

If you run 64-bit Windows, you occasionally run into discrepancies between the 32-bit and 64-bit PowerShell consoles. You must update the execution policy inside the specific bitness version of the console that actually runs your script files.
Frequently asked questions
What to do when running scripts is disabled on this system?
You can change the execution policy using the Set-ExecutionPolicy cmdlet for your current user or process scope. Alternatively, bypass the restriction entirely for a single script run.
How can fix cannot be loaded because running scripts is disabled on this system?
Change your policy scope to RemoteSigned or Unrestricted using administrative privileges, or check if a corporate Group Policy overrides your local machine settings.
Why does PowerShell 5.1 differ from PowerShell 7 regarding execution policies?
PowerShell 5.1 and PowerShell 7 store execution policy settings in different locations, meaning a policy change in one version does not automatically apply to the other (Microsoft Learn).
How to enable script execution in PowerShell safely?
You target the CurrentUser scope with RemoteSigned by running Set-ExecutionPolicy RemoteSigned -Scope CurrentUser, which allows local scripts to run while requiring downloaded scripts to carry a trusted digital signature.
Does Windows 7 PowerShell execution of scripts is disabled on this system error require special steps?
You apply the exact same Set-ExecutionPolicy commands on Windows 7, provided you have PowerShell 5.1 installed with the necessary administrative rights or registry access.