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

标签 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”

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

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/

相关文章:

c# - Neo4j 返回 HTTP 400

java - WinRM(WsMan) 和 NTLM 身份验证

windows-phone-7 - 如何获取 Bing API AppID

java - 如何从 Java 程序内部创建 powershell 远程 session ?

windows - WinRS 可以访问 UNC 路径吗?

azure - Multi-Tenancy 的 MS Graph API 权限

azure - 部署后自动删除 Azure 虚拟机

azure - 从 Azure B2C 访问 Microsoft Graph API

silverlight - 如何使用 Microsoft Silverlight 连接到我的 SQL Azure 数据库?

sql - 如何将数据库部署到 windows azure sql 数据库?