Get-WmiObject : RPC 服务器不可用.(来自 HRESULT 的异常:0x800706BA) [英] Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
本文介绍了Get-WmiObject : RPC 服务器不可用.(来自 HRESULT 的异常:0x800706BA)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我跑步时
Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber
它适用于本地和远程主机.
it works for both local and remote hosts.
当我使用
ForEach ($_ in gc u:\pub\list.txt) {
Get-WmiObject win32_SystemEnclosure -Computer $_ | select serialnumber | format-table -auto @{Label="Hostname"; Expression={$_}}, @{Label="Service Tag"; Expression={$_.serialnumber}}
}
它回来了
Get-WmiObject:RPC 服务器不可用.(来自 HRESULT 的异常:0x800706BA)
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
推荐答案
检查是否在防火墙中为每台远程机器启用了Windows Management Instrumentation (WMI-In)"规则.
Check that the "Windows Management Instrumentation (WMI-In)" rule is enabled in the firewall for each remote machine.
或者在管理命令/Powershell 提示符下运行:
Or in an Administrative Command/Powershell prompt run:
netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
这篇关于Get-WmiObject : RPC 服务器不可用.(来自 HRESULT 的异常:0x800706BA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文