gpt4 book ai didi

powershell - Get-WmiObject : The RPC server is unavailable.(HRESULT 异常:0x800706BA)

转载 作者:行者123 更新时间:2023-12-02 12:21:31 32 4
gpt4 key购买 nike

当我运行时

Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber

它适用于本地和远程主机。

当我使用主机列表执行此操作时

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 : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

最佳答案

检查是否在每台远程计算机的防火墙中启用了“Windows Management Instrumentation (WMI-In)”规则。

或者在管理命令/Powershell 提示符下运行:

netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes

关于powershell - Get-WmiObject : The RPC server is unavailable.(HRESULT 异常:0x800706BA),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11330874/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com