我从 VM 镜像克隆了 Windows Server 2012 R2 VM。我可以:
- 使用远程桌面登录。
- 从 Internet 浏览到端口 80 上的 IIS。
- 使用 Powershell 验证 WinRM 连接:“Test-WSMan -ComputerName xyz.westus.cloudapp.azure.com”
当我按下测试工具中的连接按钮时,会记录以下错误:
Error in connecting to the VM. Reason for not connecting to the VM : System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server xyz.westus.cloudapp.azure.com 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. at System.Management.Automation.Runspaces.AsyncResult.EndInvoke() at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult) at System.Management.Automation.Runspaces.Internal.RemoteRunspacePoolInternal.Open() at System.Management.Automation.RemoteRunspace.Open() at WindowsAddin.PSConnection.OpenSession()
我可以更改什么以使连接操作成功?
编辑: 我还运行了 Azure quickstart template配置 WinRM。输出是:
PS C:\Users\hans\Downloads\201-vm-winrm-windows> .\ConfigureWinRM.ps1
cmdlet ConfigureWinRM.ps1 at command pipeline position 1
Supply values for the following parameters: HostName: xyz.westus.cloudapp.azure.com
Deleted 1 rule(s).
Ok.
Ok.
不幸的是,记录的错误消息仍然相同。
最佳答案
默认情况下,Azure 资源管理器虚拟机中未启用 WinRM。要启用它,您可以使用 this 中的脚本。快速入门模板。执行 powerhsell scirpt(确保将ConfigureWinRM.ps1、makecert.exe 和makecert.exe 复制到VM)。
关于azure - 无法使用 Azure 认证测试工具 1.2 连接到 VM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36061088/