首页 文章

无法使用Azure认证测试工具1.2连接到VM

提问于
浏览
0

我从VM映像克隆了Windows Server 2012 R2 VM . 我可以:

  • 使用远程桌面登录 .

  • 从Internet浏览到端口80上的IIS .

  • 使用Powershell验证WinRM连接:"Test-WSMan -ComputerName xyz.westus.cloudapp.azure.com"

当我按下测试工具中的连接按钮时,会记录以下错误:

连接到VM时出错 . 理由不连接到VM:System.Management.Automation.Remoting.PSRemotingTransportException:连接到远程服务器xyz.westus.cloudapp.azure.com失败,出现以下错误消息:WinRM的无法完成操作 . 验证指定的计算机名称是否有效,计算机是否可通过网络访问,以及是否启用了WinRM服务的防火墙例外,并允许从此计算机进行访问 . 默认情况下,公共配置文件的WinRM防火墙例外限制对同一本地子网内的远程计算机的访问 . 有关详细信息,请参阅about_Remote_Troubleshooting帮助主题 . 在System.Management.Automation.Runspaces.AsyncResult.EndInvoke()在System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult的asyncResult)在System.Management.Automation.Runspaces.Internal.RemoteRunspacePoolInternal.Open()在系统.Management.Automation.RemoteRunspace.Open()在WindowsAddin.PSConnection.OpenSession()

我可以更改什么才能使连接操作成功?

Edit :我还运行了Azure quickstart template来配置WinRM . 输出是:

PS C:\ Users \用户汉斯\下载\ 201-VM-WinRM的窗口> \ ConfigureWinRM.ps1小命令ConfigureWinRM.ps1在命令管道位置1为下列参数提供值:主机名:xyz.westus.cloudapp.azure . com删除了1条规则 . 好 . 好 .

不幸的是,记录的错误消息仍然相同 .

2 回答

  • 0

    默认情况下,Azure Resource Manager虚拟机中未启用WinRM . 要启用它,您可以使用this quickstart模板中的脚本 . 执行powerhsell scirpt(确保ConfigureWinRM.ps1,makecert.exe和makecert.exe复制到VM) .

  • 2

    错误很明显,“默认情况下,公共配置文件的WinRM防火墙例外限制了对同一本地子网内远程计算机的访问 . ”因此,您需要添加防火墙例外 . 就这样 .

    祝你好运,希望有所帮助 .

相关问题