pm2 : File C:\Users\User\AppData\Roaming\npm\pm2.ps1 cannot be loaded because running scripts is disabled on this system
PS C:\ae-backend> pm2 start app/bin/www.js 2 --name "ae-api"
pm2 : File C:\Users\User\AppData\Roaming\npm\pm2.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
+ pm2 start app/bin/www.js 2 --name "ae-api"
+ ~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
แก้โดยการ
PS C:\ae-backend> Set-ExecutionPolicy RemoteSigned แล้วกด Y