Powershell execution setting is overridden by a policy

Boopathi Subramaniam 3,196 Reputation points

I am getting the below message when i run any powershell command. Please let me know which policy is blocking to run the powershell command


Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,362 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 13,926 Reputation points MVP

    Hi @Boopathi Subramaniam

    You must set the PowerShell Execution Policy from Restricted to RemoteSigned or Unrestricted to allow local PowerShell scripts to run.

    For more information about PowerShell Execution Policy, type help about_signing or help Set-ExecutionPolicy at the PowerShell command prompt.


    1. Select Start > All Programs > Windows PowerShell version > Windows PowerShell.
    2. Type Set-ExecutionPolicy RemoteSigned to set the policy to RemoteSigned.
    3. Type Set-ExecutionPolicy Unrestricted to set the policy to Unrestricted.
    4. Type Get-ExecutionPolicy to verify the current settings for the execution policy.
    5. Type Exit.


    If the Answer is helpful, please click Accept Answer and up-vote, this can be beneficial to other community members.

    8 people found this answer helpful.

  2. Rich Matheisen 44,776 Reputation points

    Execution policies are hierarchical. See here: about_execution_policies or "help about_Execution_Policies"

    Your "MachinePolicy" is "AllSigned". That takes precedence over "Process".

    2 people found this answer helpful.
    0 comments No comments

  3. Boopathi Subramaniam 3,196 Reputation points

    Hello RichMatheisen and Learn2Skills,

    Thank your for your help. I changed the registry settings as per below command and it worked.


    Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy -Value ByPass

    1 person found this answer helpful.
    0 comments No comments

  4. hamdou Rabi wane 0 Reputation points

    I am still having issue with this