【发布时间】:2017-10-09 11:43:32
【问题描述】:
我无法与运行 Windows 操作系统的 Azure 上的任何 VM 建立 WMI 连接。相同的命令在我的 LAN 和 WAN 上运行良好,可以连接到任何 Windows 机器。
例如
Get-WmiObject -Namespace "root\cimv2" -Class Win32_ComputerSystem -Impersonation 3 -ComputerName RemoteWinHost -Credential domain\username
工作正常,并从“RemoteWinHost”获得所需的信息。但是,当我尝试获取 Azure VM 并给出此错误时,同样失败:
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:1
+ Get-WmiObject -Namespace "root\cimv2" -Class Win32_ComputerSystem -Im ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
有人可以指导我如何完成与 Azure VM 的 WMI 连接。 VM 不是我的域的一部分,对于凭据,我使用主机名代替域名(主机名\用户名)。也尝试过不附加主机名。结果相同。
【问题讨论】:
标签: powershell azure wmi remote-access