Get-WmiObject : The RPC Server is unavailable

I have multiple windows 7 Pro and Ultimate machines on my domain. I receiving the following Error Message when running Get-WmiObject cmdlet on couple of the Remote Machines.

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:1
+ Get-WmiObject win32_bios -ComputerName remotecomputername|Select PSComputerName,Manufact ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
 + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

I checked that the "Windows Management Instrumentation (WMI-In)" rule is enabled in the firewall for each remote machine.  The DCOM component is also enable.

The following services are also running:

Remote Access Auto Connection Manager
Remote Access Connection Manager
Remote Procedure Call (RPC)
Remote Procedure Call (RPC) Locator
Remote Registry
AnagkazoSystems EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Patrick BogersDatacenter platform engineer LindowsCommented:

Have a feeling the WMI-in is not enough. Please check by disabling the firewall on 1 target and try again.
If this succeeds open de firewall (in control panel, NOT advanced) and allow a program access -> Select WMI and try again.

AnagkazoSystems EngineerAuthor Commented:
I did disable the firewall of one of the remote target machines via Group policy and it succeeded.  I enable back the firewall and allow a WMI program access and it failed.
Patrick BogersDatacenter platform engineer LindowsCommented:
Enable firewall logging and check what is blocked.
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

AnagkazoSystems EngineerAuthor Commented:
I Configure my firewall logging to check for dropped packets but nothing shows up in the pfirewall.logs file.  Log dropped packets is set to yes.

Patrick BogersDatacenter platform engineer LindowsCommented:
Please try to allow TCP port 135 as a seperate rule and see if that fixes your issue.
AnagkazoSystems EngineerAuthor Commented:
I added added TCP port 135 as a separate rule to the remote target and it did not work.  Here is something interesting:

Get-WmiObject -Class Win32_BIOS -ComputerName Machine2  didn't work but replacing the machine name with the machines IP Address works.  What is the problem
Patrick BogersDatacenter platform engineer LindowsCommented:
Thats a DNS issue. Happens when remote powershell scripts are fired.
powershell is not authoruzed by default to do DNS queries.
Better practice is using WMI.

Glad it works now.

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
AnagkazoSystems EngineerAuthor Commented:

I don't think it's a DNS issue because it works on over 100 remote targets (all are in the same OU).  I have about 15 windows 7 machines behaving this way and I have know reason why.  Still troubleshooting to figure out why I can use machine name.

Patrick BogersDatacenter platform engineer LindowsCommented:
You can try opening port 5985 or use Enable-PSremoting which does it by itself.
AnagkazoSystems EngineerAuthor Commented:

I got it working. I flushed my dns (ipconfig /flushdns) and re-registered my dns (ipconfig /registerdns) from my source machine and it worked with the computer name.  Did have something to do with DNS as you said.  the machine was pointing to a different IP address because the NIC was also assigned a secondary ip address.

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
Windows OS

From novice to tech pro — start learning today.