Are you facing WMI Error: Login to remote object ? This guide will help you.
Generally, we receive this error when we run the WMI Configuration Wizard.
Here at Ibmi Media, as part of our Server management Services, we regularly help our Customers to perform related Nagios queries.
In this context, we shall look into how to resolve the WMI error, Login to remote object.
WMI can provide management data and operational information about Windows systems.
Nagios Core and Nagios XI are capable of monitoring Windows machines via WMI.
When we run the WMI Configuration Wizard, we receive the error:
UNKNOWN – The WMI query had problems. The error text from wmic is: [wmi/wmic.c:196:main()]
ERROR: Login to remote object.
NTSTATUS: NT code 0x800706ba – NT code 0x800706ba
It is possible that the Windows Firewall is not allowing the traffic through. This can be the cause of the error.
In Windows Firewall, under Allowed Programs, we ensure WMI is enabled.
1. Windows Server 2008/2012/2016 Firewall Rules
netsh advfirewall firewall add rule dir=in name=”DCOM” program=%systemroot
%\system32\svchost.exe service=rpcss action=allow protocol=TCP localport=135
netsh advfirewall firewall add rule dir=in name =”WMI” program=%systemroot
%\system32\svchost.exe service=winmgmt action = allow protocol=TCP localport=any
netsh advfirewall firewall add rule dir=in name =”UnsecApp” program=%systemroot
%\system32\wbem\unsecapp.exe action=allow
netsh advfirewall firewall add rule dir=out name =”WMI_OUT” program=%systemroot
%\system32\svchost.exe service=winmgmt action=allow protocol=TCP localport=any
2. Windows Server 2003 Firewall Rules
By default, DCOM communicates with the client on a random port, so in order to write firewall rules, we can specify a port range:
Eventually, we allow the port range through the windows firewall:
1. The below command will open ports from 5000-5020 to match the COM Internet Services Range.
FOR /L %I IN (5000,1,5020) DO netsh firewall add portopening TCP %I “COM”%I
2. Lastly, we open DCOM port 135.
3. Then in the command prompt, we type:
netsh firewall add portopening TCP 135 “DCOM”
This article covers how to fix the WMI error for our customers.
Sometimes the standard permission levels defined in the Monitoring Windows Using WMI documentation do not expose all the monitoring capabilities of the WMI plugin.
In these cases you can elevate permissions by adding the WMI user to one of the two local groups: