Get-WmiObject : The RPC Server is Unavailable. (Exception from HRESULT: 0x800706BA)

This week while working with some PowerShell scripts that retrieve WMI information from remote servers, I ran into an issue where I was able to return results from Windows 2008 R2 servers without issue but was unable to return results from Windows 2008 (non-R2) servers even though they had PowerShell 2.0 installed and as far as I could tell they were configured exactly the same as the Windows 2008 R2 servers.

Here's the error I received:

gwmi-error1.png

1Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
2At D:Get-MachineInfo.ps1:18 char:14
3+ Get-WmiObject <<<< -class Win32_OperatingSystem `
4+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
5+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Enabling "Remote Administration" in the firewall on the Windows Server 2008 (non-R2) servers resolved this issue.

gwmi-error2.png

I verified this firewall exception was not allowed on the Windows 2008 R2 servers since those worked without issue, but it does appear that it's required on the non-R2 servers.

µ