enter image description hereI'm learning Python using Visual Studio Code. I'm getting the ExecutionPolicy angry red text. I've opened Windows Powershell as an Admin. Typed the code: "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted". I still have undefined ExecutionPolicy for MachinePolicy and UserPolicy. So I tried "Set-ExecutionPolicy -Scope MachinePolicy -ExecutionPolicy Unrestricted"...that didn't go well, lol. I'd appreciate guidance.
'''(base) PS C:\Windows\system32> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Execution Policy Change The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Bypass. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy". At line:1 char:1
- Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
-
+ CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
(base) PS C:\Windows\system32> protractor conf.js protractor : The term 'protractor' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- protractor conf.js
-
+ CategoryInfo : ObjectNotFound: (protractor:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
(base) PS C:\Windows\system32> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy UnrestrictedSet-ExecutionPolicy -Scope MachinePolicy -ExecutionPolicy Unrestricted Set-ExecutionPolicy : Cannot bind parameter 'ExecutionPolicy'. Cannot convert value "UnrestrictedSet-ExecutionPolicy" to type "Microsoft.PowerShell.ExecutionPolicy". Error: "Unable to match the identifier name UnrestrictedSet-ExecutionPolicy to a valid enumerator name. Specify one of the following enumerator names and try again: Unrestricted, RemoteSigned, AllSigned, Restricted, Default, Bypass, Undefined" At line:1 char:57
- ... CurrentUser -ExecutionPolicy UnrestrictedSet-ExecutionPolicy -Scope ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [Set-ExecutionPolicy], ParameterBindingException
- FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
(base) PS C:\Windows\system32> Set-ExecutionPolicy -Scope MachinePolicy -ExecutionPolicy Unrestricted Set-ExecutionPolicy : Cannot set execution policy. Execution policies at the MachinePolicy or UserPolicy scopes must be set through Group Policy. At line:1 char:1
- Set-ExecutionPolicy -Scope MachinePolicy -ExecutionPolicy Unrestricte ...
-
+ CategoryInfo : InvalidOperation: (:) [Set-ExecutionPolicy], InvalidOperationException + FullyQualifiedErrorId : CantSetGroupPolicy,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
(base) PS C:\Windows\system32> Set-ExecutionPolicy -Scope UserPolicy -ExecutionPolicy Unrestricted Set-ExecutionPolicy : Cannot set execution policy. Execution policies at the MachinePolicy or UserPolicy scopes must be set through Group Policy. At line:1 char:1
- Set-ExecutionPolicy -Scope UserPolicy -ExecutionPolicy Unrestricted
-
+ CategoryInfo : InvalidOperation: (:) [Set-ExecutionPolicy], InvalidOperationException + FullyQualifiedErrorId : CantSetGroupPolicy,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
(base) PS C:\Windows\system32> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined UserPolicy Undefined Process Bypass CurrentUser Unrestricted LocalMachine RemoteSigned'''