使用RemotedSigned时信任哪些文件夹

时间:2010-12-13 13:44:11

标签: powershell

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

任何帮助都会很棒。

感谢。

2 个答案:

答案 0 :(得分:2)

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

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

有关详细信息,请参阅this KB article

答案 1 :(得分:0)

那么,从UNC Path运行脚本会发生什么?

使用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.  
相关问题