Symptoms

An agent scan fails and the following message is reported


The SQL Instance Agent encountered an exception when Testing WMI connection - Could not connect to WMI on the remote machine. 

Could not return the initial result from the query 'SELECT * FROM Win32_OperatingSystem'. There was an error performing the query 'SELECT * FROM Win32_OperatingSystem'. The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)



Issue 

There was an issue connecting to the remote machine using WMI



Resolution

Though this issue is typically caused by a firewall blocking the remote connection it can also be caused by the service account not having sufficient permissions.

Please follow the troubleshooting tips in the WMI Issues section.