I already installed Angular, but in visual studio code there is an error message as shown below, when loading the command ng --version
.
How can I fix this problem?
Error:
Set-ExecutionPolicy : Access to the registry key
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied. To change the execution policy
for the default (LocalMachine) scope, start Windows PowerShell with the "Run as administrator" option. To change the execution
policy for the current user, run "Set-ExecutionPolicy -Scope CurrentUser".
At line:1 char:1
- Set-ExecutionPolicy RemoteSigned
-
+ CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
PS C:\angularsample\dummyapp> Set-ExecutionPolicy RemoteSignedSet-ExecutionPolicy RemoteSignedvvv
"Microsoft.PowerShell.ExecutionPolicyScope". Error: "Unable to match the identifier name RemoteSignedvvv to a valid enumerator
name. Specify one of the following enumerator names and try again:
Process, CurrentUser, LocalMachine, UserPolicy, MachinePolicy"
At line:1 char:53
- Set-ExecutionPolicy RemoteSignedSet-ExecutionPolicy RemoteSignedvvv
-
~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [Set-ExecutionPolicy], ParameterBindingException
- FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
PS C:\angularsample\dummyapp> Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy : Access to the registry key
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied. To change the execution policy
for the default (LocalMachine) scope, start Windows PowerShell with the "Run as administrator" option. To change the execution
policy for the current user, run "Set-ExecutionPolicy -Scope CurrentUser".
At line:1 char:1
- Set-ExecutionPolicy RemoteSigned
-
+ CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand