about_Execution_Policies
https://technet.microsoft.com/en-us/library/hh847748.aspx?f=255&MSPPError=-2147217396
在powershell中执行命令
Get-ExecutionPolicy -List
此命令也可以使用tab键进行辅助
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined
查询指定的Scope的ExecutionPolicy
Get-ExecutionPolicy -Scope CurrentUser
Get-ExecutionPolicy CurrentUser
CHANGE YOUR EXECUTION POLICY ------------------------------ To change the Windows PowerShell execution policy on your computer, use the Set-ExecutionPolicy cmdlet. The change is effective immediately; you do not need to restart Windows PowerShell. If you set the execution policy for the local computer (the default) or the current user, the change is saved in the registry and remains effective until you change it again. If you set the execution policy for the current process, it is not saved in the registry. It is retained until the current process and any child processes are closed. Note: In Windows Vista and later versions of Windows, to run commands that change the execution policy for the local computer (the default), start Windows PowerShell with the "Run as administrator" option. To change your execution policy, type: Set-ExecutionPolicy -ExecutionPolicy <PolicyName> For example: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned To set the execution policy in a particular scope, type: Set-ExecutionPolicy -ExecutionPolicy <PolicyName> -Scope <scope> For example: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser A command to change an execution policy can succeed but still not change the effective execution policy. For example, a command that sets the execution policy for the local computer can succeed but be overridden by the execution policy for the current user.
示例:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
设置完成后,可以用上面的命令进行查看
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2015-09-06 XtraForm中OfficeSkins以及BonusSkin皮肤的设置
2015-09-06 XtraForm中更换皮肤
2015-09-06 XtraForm默认皮肤的显示
2015-09-06 wcf异常汇总
2015-09-06 how to uninstall devkit
2015-09-06 asp.net中bin目录下的 dll.refresh文件