Pema Dorji
Pema Dorji

Reputation: 51

Powershell Execution Policies Restricted

How can solve this?

C:\Users\User\AppData\Roaming\npm\sanity.ps1 cannot
be loaded because running scripts is disabled on this
system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

Upvotes: 0

Views: 3131

Answers (1)

Narayana Lvsl
Narayana Lvsl

Reputation: 373

Check for Get-ExecutionPolicy if it is like "AllSigned, Bypass, Default, Restricted, Undefined" then execute the below command in PowerShell Administrator mode. You can also use RemoteSigned, Unrestricted

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Upvotes: 1

Related Questions