FIX: Running Scripts is Disabled on this System in Windows 10 (Solved)

If you trying to run a script in Windows 10 PowerShell and you receive the error message “Cannot be loaded because running scripts is disabled on this system” continue reading below to fix the problem.

FIX: script cannot be loaded because is disabled on Windows 10

 

How to FIX: Cannot Run PowerShell Script because Security Policy Prevents scripts from running in Windows 10.

The PowerShell error “%ScriptName%.ps1 cannot be loaded because is disabled on this system”, appears because of a security policy that prevents scripts to be running. To remove the restriction and enable running scripts in Windows 10, proceed as follows:

1. Open PowerShell as Administrator. To do that:

1. Press the Windows image + R keys to open the ‘Run’ command box
2. Type powershell and then press CTRL + SHIFT + ENTER.

image

2. At PowerShell copy/paste the command below and press Enter:

  • Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

3. Press Y and hit Enter at execution policy warning message to accept the change..

Enable Running Scripts on Windows 10

 

4. After the policy change is completed, close the PowerShell window.

5. Now, run the script that gave you the error “Scripts is Disabled” with admin privileges. The error should be gone now. *

* Note: If you still receive the error “Scripts are disabled on this system”, give one of the following commands and try again to run your script:

  • Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
  • set-executionpolicy remotesigned

6. Finally, revert back to the previous PowerShell execution policy setting (restriction), by running this command in PowerShell (Admin): *

  • Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted

* Note: After running the above command, you’ll receive a warning message that explains the security risks of an execution policy change. Press Y, and then press Enter to accept the change and revert to your previous policy setting.

Disable running scripts windows 10

7. Close the PowerShell window and you’re done!

That’s all folks! Did it work for you?
Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us.

Hình ảnh thuộc sở hữu của trang web qnet88.com

Đánh giá post

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Hotline: 0974.0707.83(Zalo/Viber)