DEV Community

Discussion on: How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system

Collapse
 
manutdmohit profile image
Mohit Saud

"Doesn't work"
PS C:\Windows\system32> Get-ExecutionPolicy
Restricted
PS C:\Windows\system32> Get-ExecutionPolicy Unrestricted
Get-ExecutionPolicy : Cannot bind parameter 'Scope'. Cannot convert value "Unrestricted" to type
"Microsoft.PowerShell.ExecutionPolicyScope". Error: "Unable to match the identifier name Unrestricted to a valid
enumerator name. Specify one of the following enumerator names and try again:
Process, CurrentUser, LocalMachine, UserPolicy, MachinePolicy"
At line:1 char:21

  • Get-ExecutionPolicy Unrestricted
  • ~~~~~~~~~~~~
    • CategoryInfo : InvalidArgument: (:) [Get-ExecutionPolicy], ParameterBindingException
    • FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.GetExecutionPolicyCommand
Collapse
 
rishichoudhary profile image
Rishi-choudhary

There is set-execution policy

Collapse
 
salemaljebaly profile image
Salem Aljebaly

use Set-ExecutionPolicy Unrestricted
not Get-ExecutionPolicy Unrestricted