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:
Step 3. Run command to get the list of policies:
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