• 【转】如何将计算机添加到受信任主机列表


    TrustedHosts 项可包含用逗号分隔的计算机名称、IP 地址以及完全 限定的域名的列表。允许使用通配符。

    若要查看或更改受信任主机列表,请使用 WSMan: 驱动器。

    TrustedHost 项位于 WSMan:\localhost\Client 节点。

    只有计算机上 Administrators 组的成员有权更改计算机上的受信任主机列表。

    注意:为 TrustedHosts 项设置的值会影响计算机的所有用户。

    若要查看受信任主机列表,请使用以下命令: get-item wsman:\localhost\Client\TrustedHosts 还可以使用 Set-Location cmdlet (alias = cd) 从 WSMan: 驱动器 导航到这个位置。

    例如"cd WSMan:\localhost\Client; dir"。

    若要将所有计算机添加到受信任主机列表,请使用以下命令将 *(全部)值 放入

    ComputerName set-item wsman:localhost\client\trustedhosts -value *

    还可以使用通配符 (*) 将特定域中的所有计算机添加到受信任主机列表。

    例如,以下命令将 Fabrikam域中的所有计算机添加到受信任主机列表。

    set-item wsman:localhost\client\trustedhosts *.fabrikam.com

    若要将特定计算机的名称添加到受信任主机列表,请使用以下命令格式:

    set-item wsman:\localhost\Client\TrustedHosts -value <ComputerName>[,<ComputerName>]

    其中每个 <ComputerName> 值都必须具有以下格式:

    <Computer>.<Domain>.<Company>.<top-level-domain>

    例如:

    set-item wsman:\localhost\Client\TrustedHosts -value Server01.Domain01.Fabrikam.com

    若要将计算机名称添加到现有受信任主机列表,请首先将当前值保存到变量中,

    然后将该值设置到包含当前值和新值的以逗号分隔的列表中。

    例如,若要将 Server01 计算机添加到现有受信任主机列表,请使用以下命令

    $curValue = (get-item wsman:\localhost\Client\TrustedHosts).value set-item wsman:\localhost\Client\TrustedHosts -value "$curValue, Server01.Domain01.Fabrikam.com"

    若要将特定计算机的 IP 地址添加到受信任主机列表,请使用以下命令格式:

    set-item wsman:\localhost\Client\TrustedHosts -value <IP Address>

    例如: set-item wsman:\localhost\Client\TrustedHosts -value 172.16.0.0

    若要将计算机添加到远程计算机的 TrustedHosts 列表,请使用 Connect-WSMan cmdlet 在本地计算机上的 WSMan: 驱动器中为远程计算机添加一个节点。然后使用 Set-Item 命令添加该计算机。

    有关 Connect-WSMan cmdlet 的详细信息,请参阅 Connect-WSMan。

  • 相关阅读:
    禅语
    读《只有10%的程序员能把这个小程序写对》 漫谈开发进度
    游戏里的时钟
    关于Bug
    Silverlight游戏开发心得(2)——调度器的其他话题
    [转]MySQL索引背后的数据结构及算法原理
    [转] The Development of the C Language
    Regular expression: Implementations and running times
    [转]计算机科学经典论文
    [转]Linux 进程间通信:共享内存
  • 原文地址:https://www.cnblogs.com/rayz/p/3095369.html
Copyright © 2020-2023  润新知