无法使用Azure认证测试工具1.2

时间:2016-03-17 12:51:25

标签: azure winrm azure-marketplace

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

  1. 使用远程桌面登录。
  2. 从Internet浏览到端口80上的IIS。
  3. 使用Powershell验证WinRM连接:" Test-WSMan -ComputerName xyz.westus.cloudapp.azure.com"
  4. 当我按下测试工具中的连接按钮时,会记录以下错误:

      

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

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

    修改: 我还运行了Azure quickstart template来配置WinRM。输出是:

      

    PS C:\ Users \ hans \ Downloads \ 201-vm-winrm-windows> \ ConfigureWinRM.ps1

         

    命令管道位置1

    下的cmdlet ConfigureWinRM.ps1      

    以下参数的供应值:   主机名:xyz.westus.cloudapp.azure.com

         

    已删除1条规则。

         

    确定。

         

    确定。

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

2 个答案:

答案 0 :(得分:2)

Azure资源管理器虚拟机中默认未启用WinRM。要启用它,您可以使用this快速入门模板中的脚本。执行powerhsell scirpt(确保将ConfigureWinRM.ps1,makecert.exe和makecert.exe复制到VM)。

答案 1 :(得分:0)

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

祝你好运&希望有所帮助。