使用 RemotedSigned 时哪些文件夹是受信任的

发布于 2024-10-07 08:26:16 字数 153 浏览 0 评论 0原文

当 ExecutionPolicy 设置为 RemotedSigned 时,有人如何判断哪些文件夹是受信任的?我想运行我们网络共享的多个 Powershell 脚本(未映射,因此使用完整的 unc),但我不想对它们全部进行数字签名。

任何帮助都会很棒。

谢谢。

Does any one how to tell what folders are trusted when the ExecutionPolicy is set to RemotedSigned? I want to run a number of Powershell script of our network share (which is not mapped, hence using the full unc), but i do not want to have to digitally signed them all.

Any help would be great.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘦怹 2024-10-14 08:26:16

过去,我们通过在 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains 下添加一个注册表项来完成此操作,该注册表项命名共享所在的服务器。在 EscDomains 项下,添加一个作为服务器名称的项。在该键下,添加一个名为“file”且值为 2 的 DWORD 值。

您需要在每台将从服务器运行脚本的计算机上执行此操作,但您可以通过组策略来执行此操作。除了运行 PowerShell 脚本之外,这还存在安全隐患。我不知道如果您的计算机不在域中,这是否有效。如果有更好的解决方案,我期待学习。

有关详细信息,请参阅此知识库文章

We have done this in the past by adding a registry key under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains that names the server where the share resides. Under the EscDomains key, add a key that is the server name. Under that key, add a DWORD value with the name "file" and the value 2.

You need to do this on each machine that will run scripts from the server, but you can do that via group policy. There are security implications to this beyond running PowerShell scripts. I don't know if this will work if your computers are not in a domain. If there are better solutions, I look forward to learning about them.

For more information, see this KB article.

小草泠泠 2024-10-14 08:26:16

那么,当您从 UNC 路径运行脚本时会发生什么?

使用 RemoteSigned,您应该能够运行所有编写的脚本和应用程序。无需数字签名即可在本地运行。

    RemoteSigned
        - Scripts can run.

        - Requires a digital signature from a trusted
          publisher on scripts and configuration files that
          are downloaded from the Internet (including
          e-mail and instant messaging programs).

        - Does not require digital signatures on scripts that you have run
          and that you have written on the local computer (not
          downloaded from the Internet).

        - Risks running unsigned scripts from sources other
          than the Internet and signed, but malicious, scripts.

    Unrestricted
        - Unsigned scripts can run. (This risks running malicious
          scripts.)

        - Warns the user before running srcipts and configuration
          files that are downloaded from the Internet.  

So, what happens when you run a script from UNC Path?

With RemoteSigned, you should be able to run all scripts written & run locally without a digital signature.

    RemoteSigned
        - Scripts can run.

        - Requires a digital signature from a trusted
          publisher on scripts and configuration files that
          are downloaded from the Internet (including
          e-mail and instant messaging programs).

        - Does not require digital signatures on scripts that you have run
          and that you have written on the local computer (not
          downloaded from the Internet).

        - Risks running unsigned scripts from sources other
          than the Internet and signed, but malicious, scripts.

    Unrestricted
        - Unsigned scripts can run. (This risks running malicious
          scripts.)

        - Warns the user before running srcipts and configuration
          files that are downloaded from the Internet.  
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文