PowerShell on Windows 7: Set-ExecutionPolicy for regular users

后端 未结 3 1044
半阙折子戏
半阙折子戏 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:34

    Set-ExecutionPolicy Unrestricted -Scope CurrentUser
    

    This will set the execution policy for the current user (stored in HKEY_CURRENT_USER) rather than the local machine (HKEY_LOCAL_MACHINE). This is useful if you don't have administrative control over the computer.

提交回复
热议问题