WMI Issue: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

I am trying to remotely access WMI on machines on my network. There are a few however that are responding with the above error on the code below. I have shut down the firewall application(s) and all ports are available on the machines in question. I have checked the registry for DCOM and have made sure that RPC is running to no avail. Anyone have anything else to check?

ConnectionOptions options = new ConnectionOptions();
options.Username = "*****";
options.Password = "*****";
options.Timeout = new TimeSpan(0,0,0,5,0);
ManagementScope wmiScope = new ManagementScope(@"\\" + inDevice.IPAddress + @"\root\cimv2", options);
ObjectQuery query = new ObjectQuery("SELECT Name, UserName FROM Win32_ComputerSystem");

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The firewall is probably blocking it.  Try dropping the following into a file called wmifixtest.vbs:

  Set objFirewall = CreateObject("HNetCfg.FwMgr")
  Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
  Set objAdminSettings = objPolicy.RemoteAdminSettings
  objAdminSettings.Enabled = TRUE

Then save and run the vbs script.

Repeat your test.

Please be aware, this will add an exemption for WMI in the Windows Firewall.
newgentechnologiesAuthor Commented:
No change, I have turned off the Windows Firewall on this machine and it still does not access the RPC.
newgentechnologiesAuthor Commented:
It turns out there is something wrong with the network in that part of the office...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.