"ng.ps1 cannot be loaded because running scripts is disabled on this system."

1. solution: You can set RemoteSigned permission to current user or allow all operation Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser or set-executionpolicy remotesigned or set-executionpolicy unrestricted or Set-ExecutionPolicy -Scope “CurrentUser” -ExecutionPolicy “RemoteSigned” or Set-ExecutionPolicy -Scope “CurrentUser” -ExecutionPolicy “Unrestricted” You can use also help command for ExecutionPolicy operation Help Get-ExecutionPolicy -Full After these commands you must see permission list like this [code lang=”shell”] PS D:\java\wosp-sts\PolB2BWoSp\PolEyB2B\poleyb2b-ui\src\webapp> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser PS D:\java\wosp-sts\PolB2BWoSp\PolEyB2B\poleyb2b-ui\src\webapp> Get-ExecutionPolicy -list Scope ExecutionPolicy —– ————— MachinePolicy Undefined UserPolicy Undefined Process Undefined CurrentUser RemoteSigned LocalMachine Undefined PS D:\java\wosp-sts\PolB2BWoSp\PolEyB2B\polyakeynezb2b-ui\src\webapp> [/code] 2. solution: You can set all permissions to current user with below command. Set-ExecutionPolicy AllSigned -Scope CurrentUser 3. solution: Remove script file C:\Users\okinik\AppData\Roaming\npm\ng.ps1 If with this operation wouldn’t solve then also remove the below directory C:\Users\okinik\AppData\Roaming\npm-cache\ Here are policies and scope types: Execution Policy Type: Restricted – No Script either local, remote or downloaded can be executed on the system. AllSigned – All script that are ran require to be digitally signed. RemoteSigned – All remote scripts (UNC) or downloaded need to be signed. Unrestricted – No signature for any type of script is required. Scope: LocalMachine – The execution policy affects all users of the computer. CurrentUser – The execution policy affects only the current user. Process – The execution policy affects only the current command line process.]]>

Leave a Reply

Your email address will not be published. Required fields are marked *