PowerShell on Windows 7: Set-ExecutionPolicy for regular users

后端 未结 3 1063
半阙折子戏
半阙折子戏 2020-12-04 14:16

I want to run PowerShell scripts on Windows 7 as a regular user. Whenever I try, I get the following error:

File C:\\Users\\danv\\Documents\\WindowsPowe         


        
3条回答
  •  余生分开走
    2020-12-04 14:38

    If you (or a helpful admin) runs Set-ExecutionPolicy as administrator, the policy will be set for all users. (I would suggest "remoteSigned" rather than "unrestricted" as a safety measure.)

    NB.: On a 64-bit OS you need to run Set-ExecutionPolicy for 32-bit and 64-bit PowerShell separately.

提交回复
热议问题