title: PowerShell bug “execution of scripts is disabled on this system.”
body: <p>I have a power shell script that runs to stop services, 'stop / terminate process' , delete 2 files and then restart.</p>
  
  <p>I can run this script perfect on my Windows 10 64 Bit Host Machine - with ZERO issues. 
  I try to run it in my Virtual Machines and I get the error</p>
  
  <blockquote>
    <p>cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170</p>
  </blockquote>
  
  <p>SO just for giggles I went to see my group policies and they are not configured on either machine. </p>
  
  <p>Administrative Templates > Windows Components > Windows PowerShell
  Not Configured.</p>
  
  <p>So why the issue on the virtual machine and not in my host ?</p>
  
  <p><strong>EDIT</strong> 
  Ran Get-ExecutionPolicy and also Get-ExecutionPolicy-List on VM
  Restricted</p>
  
  <pre><code>MachinePolicy       Undefined
     UserPolicy       Undefined
        Process       Undefined
    CurrentUser       Undefined
   LocalMachine       Undefined
  </code></pre>
  
  <p>Ran it on my Host</p>
  
  <pre><code>        Scope ExecutionPolicy
          ----- ---------------
  MachinePolicy       Undefined
     UserPolicy       Undefined
        Process       Undefined
    CurrentUser       Undefined
   LocalMachine    Unrestricted
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5Qb5K.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5Qb5K.png" alt="Group Policy Screen Shot"></a></p>
  
  <p>I do not know how my local machine was changed - software installation ??</p>