Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Windows»Fix: Cannot Be Loaded Because Running Scripts Is Disabled On This System

Fix: Cannot Be Loaded Because Running Scripts Is Disabled On This System

Abhishek SilwalBy Abhishek SilwalDecember 10, 2022
cannot-be-loaded-because-running-scripts-is-disabled-on-this-system

While trying to run a PowerShell script (.ps1 file), sometimes you can get the cannot be loaded because running scripts is disabled on this system message.

It is not an error but a security feature to prevent you from running any potentially harmful scripts. You can easily fix this issue by changing the execution policy for PowerShell scripts. Entering a single command should be enough.

Cannot Be Loaded Because Running Scripts Is Disabled

The only reason this issue occurs is because of the PowerShell execution policy. It usually happens due to following reasons:

  • You are running an unsigned PowerShell script.
  • Execution policy is set to restrict all PowerShell scripts.

How to Fix Cannot Be Loaded Error

Here’s how you can make it possible to run the PowerShell script:

  1. Open the admin level terminal for Windows PowerShell or the IDE you are currently using.
  2. Enter Get-ExecutionPolicy. It shows the policy for the current PowerShell session. You can also enter Get-ExecutionPolicy -List to list out the policies for all scopes.
    get-execution-policy
  3. Change the execution policy for the scope you want. 
  4. The command you need for this purpose is: Set-ExecutionPolicy -ExecutionPolicy <policy name> -Scope <scope>. See below to know the possible values for the policy name and scope.
  5. In general, we recommend using Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned, as it is more secure. 
    set-execution-policy
  6. If it doesn’t solve the issue, enter:
    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

If you have both 64-bit and 32-bit PowerShell, you must enter this command for both terminals. Their locations are:

  • C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe
  • C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Powershell.exe
Note: You can also set the RemoteSigned policy for the Current User by checking the option in Settings > Update & Security > For Developers > PowerShell.

Possible values for <policy name>:

  • Restricted: Disallows running scripts.
  • All Signed: Permits running signed scripts only
  • RemoteSigned: Allows running all scripts from the local computer but only signed ones for scripts you download.
  • Unrestricted: Permits running all scripts but warns before running external scripts
  • Default/Undefined: Restricted for clients and RemoteSigned for servers.
  • Bypass: Permits all scripts, and you get no warning.

Possible <scope> values:

  • MachinePolicy: Group-level policy for all users
  • UserPolicy: Group-level policy for the current user
  • Process: Temporary policy for current PowerShell session
  • CurrentUser: Registry policy configuration for the current user
  • LocalMachine: Registry policy configuration for all users
fix
Abhishek Silwal
  • LinkedIn

Abhishek Silwal is an Electronics Engineer and a technical writer at TechNewsToday. He specializes in troubleshooting a wide range of computer-related issues. His educational background in Electronics Engineering has given him a solid foundation in understanding of computers. He is also proficient in several programming languages and has worked on various robotics projects. Even in his early days, he used to tinker with various computer components, both hardware, and software, to satiate his curiosity. This experience has given him a breadth of experience that goes beyond his educational qualification. Abhishek has been writing articles on dealing with varieties of technical issues and performing specific tasks, especially on a Windows machine. He strives to create comprehensive guides on fixing many system and hardware issues and help others solve their problems. You can contact him at abhisheksilwal@technewtoday.com

Related Posts

amd-software-not-opening

How to Fix AMD Software Not Opening

March 3, 2023
how to create a folder

7 Ways to Create a Folder on Windows

March 3, 2023
turn off automatic updates windows

How to Turn Off Automatic Updates on Windows

March 2, 2023
Memory-Compression

What is Memory Compression in Windows? Should You Enable or Disable It

March 1, 2023
dism-vs-sfc-vs-chdsk

DISM, SFC, CHKDSK: What’s the Difference

February 28, 2023
how-to-open-exe-file

4 Ways to Open EXE File

March 2, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
Memory-Compression

What is Memory Compression in Windows? Should You Enable or Disable It

March 1, 2023
dism-vs-sfc-vs-chdsk

DISM, SFC, CHKDSK: What’s the Difference

February 28, 2023
bios-settings-for-gaming

Best BIOS Settings for Gaming

February 16, 2023
You may also like
how-to-clean-hp-printer-rollers

How to Clean HP Printer Rollers

March 3, 2023
keyboard input lag

9 Ways to Fix Keyboard Input Lag

March 3, 2023
keyboard key is stuck

How to Fix a Stuck Key on a Keyboard

March 3, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.