Set-ExecutionPolicy Issue

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Alexander Johansson Alexander Johansson 2 years, 1 month ago.

  • Author
    Posts
  • #20078
    Profile photo of Ram S
    Ram S
    Participant

    Hi Please help me on this

    am unable to set the ExecutionPolicy in powershell.

    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 http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution
    policy?
    [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
    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 AllSigned. 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 RemoteSigned
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException
    + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
    PS C:\>

  • #20079
    Profile photo of Alexander Johansson
    Alexander Johansson
    Participant

    Hello,

    Do you have any GPO that is overriding the setting?

    /Alexander

  • #20081
    Profile photo of Ram S
    Ram S
    Participant

    Hello Alexander,

    Thanks for the reply.

    I don't have any GPO for this. Am trying it in my local machine witch don't have any GPO.

  • #20082
    Profile photo of Alexander Johansson
    Alexander Johansson
    Participant

    If you start a new shell and type the following:

    Get-ExecutionPolicy -List

    What does it return?

    Also, make sure you are running the

    Set-ExecutionPolicy

    with elevated privileges.

    /Alexander

You must be logged in to reply to this topic.