PowerShell脚本签名失败 [英] PowerShell script signing failed

查看:211
本文介绍了PowerShell脚本签名失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个特殊的问题。我创建了一个本地证书,并用它签署了一个脚本文件。完成后,状态有效。但是当我尝试运行错误时,我收到错误。当我检查Get-AuthenticodeSignature时,它说我的脚本状态是未知错误。我检查了一切,直到文件的编码(是的,它是UTF-8,我重新创建文件只是为了确定,没有骰子)。



有人知道发生了什么吗?



错误图片。

I have got a peculiar problem. I created a local certificate and I signed a script file with it. When it completes, it sais that the status is valid. But when I try to run the error, I get an error. When I check the Get-AuthenticodeSignature it says my script status is "Unknown Error". I've checked everything, down to the encoding of the file (yes, it's UTF-8, I recreated the file just to be sure, no dice).

Anybody have any idea what is going on?

Error image.

推荐答案

我将ExecutionPolicy更改为RemoteSigned。



感谢病毒风暴为解决方案。 (如果他发布相同的解决方案,我会接受它作为解决方案并给予他信任。)
I changed the ExecutionPolicy to RemoteSigned.

Thanks to virusstorm for the solution. (If he posts the same solution, I'll accept it as the solution and give credit to him.)


这篇关于PowerShell脚本签名失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆