简体   繁体   English

PowerShell-不受限制的执行策略问题

[英]PowerShell - Unrestricted execution policy Issue

I have a windows update module which I copy over into the Module directory for PS. 我有一个Windows更新模块,我将其复制到PS的Module目录中。 however, even with the Set-ExecutionPolicy unrestricted command issued, when i try to execute the .ps1 file, I get an error stating that the it's not digitally signed and will not run. 但是,即使发出了Set-ExecutionPolicy不受限制的命令,当我尝试执行.ps1文件时,也会收到一条错误消息,指出该文件未进行数字签名并且将无法运行。

I was under the impression that if you set the exection policy to 'unrestricted' that you don't need to have scripts 'signed' in order to run. 我的印象是,如果将执行策略设置为“不受限制”,则无需让脚本“签名”即可运行。

Is there something else that I need to do in the Windows 2008 R2 environment? 在Windows 2008 R2环境中,我还需要做其他事情吗?

Thanks. 谢谢。

Make sure the script is not blocked. 确保脚本未被阻止。 Check if the script's properties page contains an 'Unblock' button. 检查脚本的属性页面是否包含“取消阻止”按钮。 If so, click it to unblock the file. 如果是这样,请单击它以取消阻止文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM