相关疑难解决方法(0)

使用ip-address作为目标的Powershell远程处理

我在Server 2008 R2上成功启用了PSRemoting.我可以使用主机名作为目标在同一网络中进行远程pssession.

当我尝试从任何计算机(在网络内或从其他网络(例如通过VPN))使用IP地址作为目标时,我失败了.我希望能够通过我的VPN连接使用远程处理,因为无法解析主机名,因此我必须使用IP地址.

我不想在我的hosts文件中添加名称,因为我们的客户端上有一些其他服务器具有相同的dns-name,我不想删除并再次插入name-ip-address-association然后再次.

我希望有人能告诉我如何通过IP调用psremoting-target.

编辑:更具体地说,我希望能够运行:

Enter-PSSession -Computername 192.168.123.123 -credentials $cred 
Run Code Online (Sandbox Code Playgroud)

但是,如果我将主机名传递给" -Computername" ,我只能运行该命令

Edit2:
当我尝试使用ip而不是主机名(来自内部网络)登录时,我收到了错误消息:

Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cannot process
 the request. Default authentication may be used with an IP address under the following conditions: the transport is HT
TPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure T
rustedHosts. Note that computers …
Run Code Online (Sandbox Code Playgroud)

powershell remoting powershell-remoting

59
推荐指数
3
解决办法
14万
查看次数

标签 统计

powershell ×1

powershell-remoting ×1

remoting ×1