Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 获取WMIOObject:RPC服务器不可用_Sql Server_Powershell_Wmi - Fatal编程技术网

Sql server 获取WMIOObject:RPC服务器不可用

Sql server 获取WMIOObject:RPC服务器不可用,sql-server,powershell,wmi,Sql Server,Powershell,Wmi,当我试图从服务器获取磁盘大小信息时,出现以下错误。我使用的脚本在其他62台SQL服务器上运行良好,但无法连接到其中3台。我不相信这是我的powershell脚本,我认为这与服务器有关,但我不确定该去哪里查找 Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)At F:\SQL_DB_SIZES\Disk Space Report.ps1:178 char:8 + $dp = G

当我试图从服务器获取磁盘大小信息时,出现以下错误。我使用的脚本在其他62台SQL服务器上运行良好,但无法连接到其中3台。我不相信这是我的powershell脚本,我认为这与服务器有关,但我不确定该去哪里查找

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)At F:\SQL_DB_SIZES\Disk Space 
Report.ps1:178 char:8
+  $dp = Get-WmiObject win32_logicaldisk -ComputerName $server |  Where-Object {$_ ...
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

我从哪里开始拍摄这个?我假设是在目标服务器上,但我不确定要看哪里。

这不是真正的PowerShell问题。您在使用远程WMI时遇到了问题,这可能是很多问题,例如防火墙问题。这更适合ServerFault。谢谢,我更新了标签。