Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled On This System

How To Fix Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled On This System

Posted by Ervin Adams on January 6, 2023

Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled On This System

How To Fix Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled On This System

Posted by Ervin Adams on January 6, 2023

This error happens when your system has disabled the running script and your system can't accept certain commands such as ngrok.

Your computer system by default has security against these kind of script executions, therefore the error occurs.

Here are the steps to follow to solve the problem:

Step 1. Open command prompt as admin and run commands below:

If you want the script to run now and once:

set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process

If you want to be able to run all the script all the time:

set-ExecutionPolicy RemoteSigned -Scope CurrentUser 

Step 2. You can run the command below to get the policies:

get-ExecutionPolicy

Step 3. Run command to get the list of policies:

get-ExecutionPolicy -list

If you see the list of execution policies, your problem is resolved succesfully.

PS C:\Windows\system32> Get-ExecutionPolicy -list
        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process    Unrestricted
  CurrentUser       Undefined
 LocalMachine      Restricted

 

Any question?
This field is required
Your question have been successfully submitted and will be reviewed before published
Please login to ask a question
Related
No related post
Related
No related post