我在Azure VM上更改了RDP的端口。现在我无法连接到它。可能是因为我忘了将防火墙设置为允许新端口。现在我不能访问它了。
我不确定之前是否在该虚拟机上设置了Powershell。然而,当我使用Enter-PSSession时,它给了我这个错误:
Enter-PSSession : Connecting to remote server 40.xx.xxx.xxx failed with the following error message : WinRM cannot
complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the
network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By
default, the WinRM firewall exception for public profiles limits access to remote computers within the same local
subnet. For more information, see the about_Remote_Troubleshooting Help topic.发布于 2016-09-11 15:34:21
您需要将VM的IP地址添加到受信任的主机(位于您要连接的计算机上。Set-Item WSMan:\localhost\Client\TrustedHosts "40.xx.xxx.xxx“(或*)
发布于 2016-09-12 18:39:55
发布于 2016-09-13 03:06:31
我找到了我自己的答案。在azure端口中,有一种上传powerscript文件以在VM中运行的方法。我只是用它把端口改回原来的3389,然后重启。
https://stackoverflow.com/questions/39418290
复制相似问题