title: Powershell : Execution Policy
body: <p>I have been running my code for past few months by doing this -</p>
  
  <pre><code>Set-ExecutionPolicy Unrestricted
  </code></pre>
  
  <p>But, something weird is happening and I am getting this <strong>error</strong> always -</p>
  
  <blockquote>
    <p>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 "Unrestricted". Type "Get-ExecutionPolicy -List"
    to view your execution policy settings. For more information, please
    see "Get-Help Set-ExecutionPolicy."</p>
  </blockquote>
  
  <p>I have referred these links but no luck - </p>
  
  <ul>
  <li><p><a href="http://blogs.msdn.com/b/pasen/archive/2011/12/07/set-executionpolicy-windows-powershell-updated-your-execution-policy-successfully-but-the-setting-is-overridden-by-a-policy-defined-at-a-more-specific-scope.aspx" rel="noreferrer">http://blogs.msdn.com/b/pasen/archive/2011/12/07/set-executionpolicy-windows-powershell-updated-your-execution-policy-successfully-but-the-setting-is-overridden-by-a-policy-defined-at-a-more-specific-scope.aspx</a></p></li>
  <li><p><a href="http://blog.whatsupduck.net/2010/09/issues-with-configuring-powershell.html" rel="noreferrer">http://blog.whatsupduck.net/2010/09/issues-with-configuring-powershell.html</a></p></li>
  <li><p><a href="http://www.howtogeek.com/106273/how-to-allow-the-execution-of-powershell-scripts-on-windows-7/" rel="noreferrer">http://www.howtogeek.com/106273/how-to-allow-the-execution-of-powershell-scripts-on-windows-7/</a></p>
  
  <p><strong>I am loading the Powershell using C# on a 64-bit Windows 7 via a 32-Bit Winforms Application using .Net 4.0</strong></p>
  
  <p>What is the exact setting which I need to do such that I do not get this error on any system ? [Everything was working fine]. What should these values be on any system such that I am able to call Powershell from C# seamlessly - </p></li>
  </ul>
  
  <p><strong>Get-ExecutionPolicy -List</strong></p>
  
  <blockquote>
  <pre><code>MachinePolicy                                                           
  UserPolicy                                                           
  Process                                                        
  CurrentUser                                                        
  LocalMachine
  </code></pre>
  </blockquote>