如果计算机名称包含点,则PowerShell远程处理不起作用

我有一个系统,当计算机名包含点时,我无法使用PowerShell连接到远程计算机(或远程自己)。

例如,这工作:

Enter-PSSession HostA -Credential user1 

但是这不是:

  Enter-PSSession 192.168.0.1 -Credential user1 

这也不起作用:

  Enter-PSSession HostA.DomainA -Credential user1 

当我尝试通过networking将PS-Session连接到使用其IP地址或完整域名的同一台计算机(或者仅通过将短名称添加到点)时,会发生同样的问题。 唯一的例外是“127.0.0.1” – 在这种情况下远程PS连接工作。 我将TrustedHosts设置为'*' – 这没有任何区别。

我有另一个系统,不会出现这种行为 – 即我可以交换使用IP地址和完全合格的主机名称。 我没有看到这些系统之间的configuration有任何明显的差异。

我收到以下错误:

 Enter-PSSession : Connecting to remote server 192.168.0.1 failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:1 Enter-PSSession 192.168.0.1 -Credential user1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (192.168.0.1:String) [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : CreateRemoteRunspaceFailed 

有没有人有这是什么原因的想法?

PSRemoting到一个IP地址总是给我一个错误,可能是与计算机名称和证书有关,我没有仔细研究过它。 FQDN但是适用于我。 请记住,FQDN可以与您的域名分开,这是行不通的。

微软说这段时间是NETBIOS名字中的一个有效字符,但是改变我的Windows 7计算机上的计算机名称来添加一个点会给我一个错误。 经过进一步的调查,MS 对此有特殊的说法 :

句点字符将名称分隔为NetBIOS作用域标识符和计算机名称。 NetBIOS范围标识符是可选的string,用于标识在同一个物理TCP / IPnetworking上运行的逻辑NetBIOSnetworking。 要使NetBIOS在计算机之间工作,计算机必须具有相同的NetBIOS范围标识符和唯一的计算机名称。

这与指定fqdn时使用一段时间稍有不同。 实际上,我甚至会说它可能会将点解释为指定一个fqdn,这就是导致问题的原因。