Repair Running Scripts is Disabled on this System Powershell Error



Updated November 2024: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
  1. Download and install the repair tool here.
  2. Let it scan your computer.
  3. The tool will then repair your computer.

If PowerShell displays an error message – the file cannot be loaded because the scripts running on this system are disabled, you must enable the script on your Windows 10 computer. The reason for this error is that your user account does not have enough privileges to run this script. This does not mean that you must have administrator-level privileges, but also that you must be free to run this type of PowerShell or cmdlet script.

This problem can occur if the execution policy is set to Restricted. Some Windows PowerShell cmdlets cannot work if the policy is too restrictive.

To solve this problem, follow these steps:

  • Run the Azure Active Directory Module for Windows PowerShell as an administrator. To do this, click Start, click All Programs, click Windows Azure Active Directory, right-click Windows Azure Active Directory Module for Windows PowerShell, and then click Run as Administrator.
  • Set the execution policy to Unrestricted. To do this, type the following cmdlet, then press Enter :

Set-ExecutionPolicy Free execution

  • Run the PowerShell Windows cmdlets you want.
  • Set the execution policy to Restricted. To do this, type the following cmdlet, then press Enter :

Set-ExecutionPolicy Restricted

I still want to be able to execute scripts?

OK you can either change the scope of the last command from ‘Process’ to ‘CurrentUser’ or ‘CurrentMachine’.

  • Processes: The execution policy only affects the current Windows PowerShell process.
  • Current user: The execution policy only affects the current user.
  • LocalMachine: The execution policy affects all users of the computer.

Or you can simply modify the policy ‘Globally’;
Set-ExecutionPolicy {Value}

The possible values are;

  • Restricted: Does not load configuration files and does not execute scripts. The default execution policy is restricted.
  • AllSigned: All scripts and configuration files must be signed by a trusted editor, including the scripts you write on the local computer.
  • RemoteSigned: All scripts and configuration files downloaded from the Internet must be signed by a trusted editor.
  • Without restriction: Load all configuration files and execute all scripts. If you are running an unsigned script that has been downloaded from the Internet, you will be asked to ask permission before running it.
  • Bypass: Nothing is blocked and there is no warning or prompt.
  • Undefined: Deletes the currently affected execution policy from the current scope. This setting does not delete an execution strategy defined in a group policy area.

CONCLUSION

You must set the PowerShell execution policy when you try to execute PowerShell scripts for the script to work. Otherwise, you may receive an error message “scriptname cannot be loaded, because running scripts is disabled on this system”.

https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system/13696614



Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here

Scroll to Top