Powershell: Execution Policy

I have been running my code in the last few months doing this -

Set-ExecutionPolicy Unrestricted

But something strange is happening, and I always get this error -

Windows PowerShell has successfully updated your execution policy, but the setting is overridden by a policy defined in a more specific area. Due to overrides, your shell will retain the current effectiveness of the No Limit execution policy. Enter "Get-ExecutionPolicy -List" to view the execution policy settings. For more information, please see "Get-Help Set-ExecutionPolicy".

I referenced these links but no luck -

Get-ExecutionPolicy -List

MachinePolicy                                                           
UserPolicy                                                           
Process                                                        
CurrentUser                                                        
LocalMachine
+5
source share
1

, , Get-ExecutionPolicy -List:

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined 
 LocalMachine    RemoteSigned

, , reset :

Set-ExecutionPolicy Undefined -Scope <scope-name>

, .

+1

All Articles