locked
Not able to run script in Windows 10 RRS feed

  • Question

  • Hello

    I am not run any kind of powershell script in Win 10 machine, getting following error. I tried on various multiple w10 machine, getting same error. However it is working on W7 and W8 machine,

    File C:\Scripts\CreateWindowsTile\CreateWindowsTile.psm1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170

    I already give following command as an administrator and as normal user, but getting above mentioned error.

    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

    I also checked existing policy, see below

    Please advise

    Avi



    • Edited by Avian123 Thursday, June 1, 2017 6:48 AM
    Thursday, June 1, 2017 6:07 AM

All replies

  • I always set scope CurrentUser. And possibly, you could try Unrestricted. In any case, it should work then.
    • Edited by hpotsirhc Thursday, June 1, 2017 7:02 AM
    Thursday, June 1, 2017 7:02 AM
  • Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force -Verbose
    Try this.

    Thursday, June 1, 2017 7:28 AM
  • You cannot set the current user or the process scopes to be less restrictive than the machine scope.  If a GPO is applied it cannot be overridden.

    The issue, from the image above, is not the policy but it is the scripts.  Script execution can be totally disabled by policy.  That is what the error is indicating.


    \_(ツ)_/

    Thursday, June 1, 2017 7:36 AM
  • 1> Create a test OU

    2>  add the user & win 10 machine to that ou

    3>Apply Block inheritance & run gpupdate /force

    4>Reboot the machine & login with the test user 

    Thursday, June 1, 2017 9:01 AM