How to Fix : Script cannot be loaded because the execution of scripts is disabled on this system.

You can fix this issue in lot of different ways depending on your environment by running below command in powershell

1.

Set-ExecutionPolicy RemoteSigned

RemoteSigned  – all scripts you created yourself will be run, all scripts downloaded from the internet will need to be signed by a trusted publisher

2.

Set-ExecutionPolicy unrestricted

Unrestricted – Executes any script

3.

ExecutionPolicy ByPass -File “Script name”

Bypass a particular script

If you are in controlled or restricted environment

4.

Set-ExecutionPolicy -Scope “CurrentUser” -ExecutionPolicy “RemoteSigned”

or

Set-ExecutionPolicy -Scope “CurrentUser” -ExecutionPolicy “Unrestricted”

 
 
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s