博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
about_Execution_Policies
阅读量:6830 次
发布时间:2019-06-26

本文共 1942 字,大约阅读时间需要 6 分钟。

在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 
For example: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned To set the execution policy in a particular scope, type: Set-ExecutionPolicy -ExecutionPolicy
-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

设置完成后,可以用上面的命令进行查看

 

转载地址:http://agjkl.baihongyu.com/

你可能感兴趣的文章
Swift 4.1带来条件一致性等语言上的提升
查看>>
Apache Pulsar中的地域复制,第2篇:模式和实践
查看>>
百度开源AI硬件开发平台BIE-AI-Box和BIE-AI-Board
查看>>
管理微服务中的数据
查看>>
百度发布开源智能边缘计算平台OpenEdge
查看>>
如何用Uber JVM Profiler等可视化工具监控Spark应用程序?
查看>>
京东618:六年历程步步为营,京东商城的安全保卫战
查看>>
华泰证券:如何自研高效可靠的交易系统通信框架?
查看>>
网易云基于Prometheus的微服务监控实践
查看>>
深入剖析通信层和RPC调用的异步化(下)
查看>>
英特尔发布CPU新架构,突破性采用3D堆栈法
查看>>
CNCF接纳Harbor为沙箱项目
查看>>
三问百度云,ABC如何帮它跑赢马拉松?
查看>>
使用人工智能测试软件
查看>>
短视频时代,LinkedIn如何利用数据提高视频性能
查看>>
《Storm Applied》书评与作者访谈
查看>>
用深度学习解决冯-诺依曼结构内存性能瓶颈
查看>>
2016 “Better Software East/DevOps East/Agile Dev East”三个会议上的发言
查看>>
五大理由告诉你,再不看Kubernetes真的晚了
查看>>
编译安装php&&apahce以及pecl使用
查看>>