13

Occasionally I get this error when working on remote computers. It's hit or miss on which computer I get it on. But I am able to ping the computer and test-connection pans out. For example, the computer I got this error on today I was able to get to yesterday. I know the computer is on because It's right next me.

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:14
+ get-wmiObject <<<<  -Class win32_operatingsystem -ComputerName $current -Authentication 6 -credential $credential | Invoke-WMIMethod -name Win32Shutdown
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
Robert
  • 809
  • 3
  • 10
  • 19
  • possible duplicate? http://stackoverflow.com/questions/4657724/wmi-the-rpc-server-is-unavailable-exception-from-hresult-0x800706ba-throws – cirrus Oct 16 '12 at 19:30
  • In my case, the Logon Account was faulty. Need to make sure it is declared like domain\username and also need to make sure the username is still active in the domain. – RookieRoo Mar 02 '23 at 09:41

6 Answers6

14

Check to see if the Remote Procedure Call (RPC) service is running. If it is, then it's a firewall issue between your workstation and the server. You can test it by temporary disabling the firewall and retrying the command.

Edit after comment:

Ok, it's a firewall issue. You'll have to either limit the ports WMI/RPC work on, or open a lot of ports in the McAfee firewall.

Here are a few sites that explain this:

  1. Microsoft KB for limiting ports
  2. McAfee site talking about the same thing
Nick
  • 4,302
  • 2
  • 24
  • 38
6

You may get your answer here: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

UPDATE

It might be due to various issues.I cant say which one is there in your case. It may be because:

  • DCOM is not enabled in host pc or target pc or on both
  • your firewall or even your antivirus is preventing the access
  • any WMI related service is disabled

Some WMI related services are:

  • Remote Access Auto Connection Manager
  • Remote Access Connection Manager
  • Remote Procedure Call (RPC)
  • Remote Procedure Call (RPC) Locator
  • Remote Registry

For DCOM settings refer to registry key HKLM\Software\Microsoft\OLE, value EnableDCOM. The value should be set to 'Y'.

bluish
  • 26,356
  • 27
  • 122
  • 180
Abhishek_Mishra
  • 4,551
  • 4
  • 25
  • 38
1

My problem turned out to be blank spaces in the txt file that I was using to feed the WMI Powershell script.

Vanhalo
  • 11
  • 1
1

I had the same problem when trying to run a PowerShell script that only looked at a remote server to read the size of a hard disk.

I turned off the Firewall (Domain networks, Private networks, and Guest or public network) on the remote server and the script worked.

I then turned the Firewall for Domain networks back on, and it worked.

I then turned the Firewall for Private network back on, and it also worked.

I then turned the Firewall for Guest or public networks, and it also worked.

0

Duting create cluster, my error was:

An error occurred while creating the cluster.
Could not determine Management Point Network Type.

The RPC server is unavailable

Solution:

Server Manager
Local Server
Click on one of the network adapter links, like "Ethernet".
Control Panel\Network and Internet\Network Connections
Right click on the first network adapter
Internet Protocol Version 4 (TCP/IPv4)
Properties
Advanced
DNS
Click radio button:
Append primary and connection specific DNS suffixes
Brian Fitzgerald
  • 634
  • 7
  • 14
0

If anyone else is reading this eons later. My problem was I deployed a GPO a few months ago that disables printer spooling via Windows Firewall rules. One of the rules is "File and printer sharing (Spooler Service - RPC-EPMAP)". This was set to deny.

This blocked the "RPC Endpoint Mapper" port range inbound and didn't specify a service. As a result this was blocking all traffic inbound on all RPC ports (tcp 1024-5000).

Disables the rule and this magically started working again.

TLDR; You need to allow the RPC Endpoint Mapper port range inbound on Windows firewall (tcp 1024-500) along with the WMI-In rule.

HalfNeck
  • 1
  • 1