Powershell - RPC server is unavailable 0x800706BA

I am building a tool for running various powershell commands on computers in our organization. I keep getting this error, and WAS getting an error about WMI; I am now able to enter-pssession on a test PC, but I can't run Get-WMIObject on it without the RPC error. I have opened ports 135, 137, 445, 5985, 5986, and 24158 through our AV firewall, and selected "Allow RPC connections" as well. I have run the enable-psremoting -force command on it, it says that it is already configured.

Any advice as to what I may be missing? I have searched the net for days now.

Matthew EilersI.T. SpecialistAsked:
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.

MacleanSystem EngineerCommented:
I suppose you need to deploy WinRM 3.0 on all systems and enable Remote Management prior to being able to run the query everywhere.
Do note, I believe that if you deploy WinRM 3.0 on Exchange 2010 servers that there is an issue. So avoid that one if applicable.
This guess is based on assuming a lot however.
For more accurate info you would need to list more detail as to which OS this applies to etc :)

More info on WinRM 3.0 here
Paste a screenshot of the complete error message you're getting, as well as the command you're running.

Are you trying to query a remote computer with the Get-WmiObject cmdlet?  Or just once entered into the remote session via Enter-PsSession are you querying locally?
Have you tried the Get-CimInstance cmdlet instead?  What info are you querying (there may be a better way to query)?
Matthew EilersI.T. SpecialistAuthor Commented:
I am using Get-WMIobject -Class Win32_OperatingSystem -computername *computername* | Select-Object -Property BuildNumber,BuildType,Caption,CSDVersion,CSName,ServicePack*,SystemType

This is from one Windows 7 machine to another. I can Enter-Pssession and run commands locally, but I am unable to query using the powershell scripts.
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Matthew EilersI.T. SpecialistAuthor Commented:
I actually may have figured it out. I have only been using powershell for a brief time, and am new to firewall stuff as well. I had built a policy within ESET remote administrator to open ports and allow RPC through. I had also checked the "Enable Personal Firewall." I turned that off and I can now query as I was expecting. Don't know if it was a fluke, or if it will stop working again because something else is going on... but for now I can hit the computers I expect to with my tool.

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
Get-WmiObject uses different ports to gather remote information than PS Remoting.  For scalability (and simplification of firewall rules), I would actually recommend using PS Remoting (and then using Get-WmiObject/Get-CimInstance within the remote session).  Get-CimInstance by default will use WsMan (same as PS Remoting) to communicate with remote machines, but can also be configured to use DCOM/WMI.
Seth SimmonsSr. Systems AdministratorCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Matthew Eilers (https:#a42401878)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer
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

From novice to tech pro — start learning today.