WMI Test 1
This test checks that requests are reaching WMI.
Run this test from the Windows server being monitored.
- Click Control Panel | Administrative Tools | Event Viewer to open the Event Viewer.
- Click View | Show Analytic and Debug Logs to select this menu option.
- Click Applications and Service Logs
- Click to expand Microsoft | Windows | WMI-Activity
Right click Trace | Enable Log.Tip: To save log entries, right click Trace | Save All Events As.
- If nothing is displayed then the request never reached WMI. The issue is a security or networking issue.
If events with error messages are displayed then those events can be investigated. If you encounter WMI errors, see the WMI errors topic on this page.
WMI Test 2
This test checks that Microsoft tools can connect to WMI.
Run this test from the Spotlight Diagnostic Server.
- Login to the Spotlight Diagnostic Server host under the account used to run the Spotlight Diagnostic Server service.
- Click Control Panel | Administrative Tools | Computer Management.
- Right click Computer Management (Local) | Connect to another computer.
- Specify the \HOSTNAME where HOSTNAME is the name of machine you want to monitor with Spotlight.
- Click Services and Applications.
- Right click WMI Control | Properties to open the WMI Control Properties dialog.
- Ensure the General tab is open.
If successful, try to monitor HOSTNAME with Spotlight again.
WMI Test 3
This test checks that WMI is working and returns data properly.
If you encounter WMI errors, see the WMI errors topic on this page.
Run this command on the machine you want to monitor. Run this command locally from the command prompt.
wmic path Win32_PerfRawData_PerfDisk_LogicalDisk get FreeMegabytes
Run either of the following commands on the Spotlight Diagnostic Server.
wmic /node: HOSTNAME /user: DOMAIN\USER path Win32_OperatingSystem get BuildNumber, Caption, CSDVersion, Version
wmic /node: HOSTNAME /user: DOMAIN\USER path Win32_PerfRawData_PerfDisk_LogicalDisk get FreeMegabytes
|HOSTNAME||Identify the host computer you want to monitor with Spotlight. Use the fully qualified domain name, machine name or IP-address.|
|DOMAIN\USER||Valid Windows login credentials.|
You may want to consider a WMI Diagnostic Utility provided by Microsoft. It is a utility to help system administrators diagnose and repair problems with the WMI service. See: http://www.microsoft.com/en-us/download/details.aspx?id=7684.
The following is a guide to troubleshooting WMI errors.
The RPC server is unavailable.
Spotlight is not able to establish a connection with the Windows server to be monitored.
Exception from HRESULT: 0x800706BA
Verify the following:
The address of the server is entered correctly.
Verify correct host name or IP address. For more information, see Windows Server | Connection Details. Verify the host is available (not currently shut down).
The Remote Procedure Call (RPC) service is running on the Windows server to be monitored.
Verity that “Remote Procedure Call (RPC)” is running and set to auto start after restart.
TCP Port 135 is open to internal traffic on the Spotlight Diagnostic Server and the Windows server to be monitored.
WMI opens an undetermined port in addition to port 135. This can be troublesome in a firewalled environment. Specifying a port range for WMI is recommended for this type of environment. For more information, see How to limit the number of ports used by WMI.
The Windows server to be monitored is not blocked by the firewall.
Either configure WMI to use a fixed ports range (For more information, see How to limit the number of ports used by WMI.) or enable remote administration exception.
Follow these steps to enable remote administration exception.
On the Windows server to be monitored:
- Open the Group Policy Object Editor (gpedit.msc), open Computer Configuration | Administrative Templates | Network | Network Connections | Windows Firewall
- Open either Domain Profile or Standard Profile, depending on which profile you want to configure.
- Enable the following exceptions: “Allow Remote Administration Exception” and “Allow File and Printer Sharing Exception”.
The “TCP/IP NetBIOS Helper” service is running.
Verity that “TCP/IP NetBIOS Helper” is running and set to auto start after restart.
The “Windows Management Instrumentation” service is running on the Windows server to be monitored.
Verity that “Windows Management Instrumentation” is running and set to auto start after restart.
Access is denied. Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)
The Windows user specified is unknown to the Windows server or does not have administrator rights.
For more information, see How to configure WMI with minimum required user permissions.
WMI connection time outs
The timeout value defaults to the value DCOM specifies (usually 60 seconds).
You can adjust this value via dcomcnfg.exe
WMI query failed: Invalid class. [0x80041010]
The WMI class does not exist on the Windows server being monitored.
Solution: Recreate the WMI classes.
Either of the following will recreate the WMI classes:
- Open a command prompt window and run the following command: wmiadap /f
Windows Server 2003: Use the Microsoft Extensible Counter List (Exctrlst) utility to enable the following counters:
Win32_PerfDisk, Win32_PerfNet, Win32_PerfOS and Win32_PerfProc.
A reboot of the Windows server is required.
SQL Server Analysis Services Connections
Either of the following will recreate the WMI classes:
Open a command prompt window on the server hosting the SQL Server Analysis Services instance. Run the following command: wmiadap /f
Unregister and re-register the WMI classes. To do so:
On the problematic machine with SQL Server Analysis Services installed, find out the SQL installation path. See below for the default installation path. Your installation path may be different.
SQL Server Analysis Services 2014 C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\bin\Counters SQL Server Analysis Services 2012 C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\bin\Counters SQL Server Analysis Services 2008 C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\bin\Counters SQL Server Analysis Services 2005 C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\bin
You are looking for the folder that contains the following files:
For unamed instances: MSSQLServerOLAPService perf-MSSQLServerOLAPServicemsmdctr.ini
For named instances: MSOLAP$Your_SSAS_NamedInstanceName perf-Your_SSAS_NamedInstanceNamemsmdctr.ini
If you need to check the named instance name, use services.msc.
At the command prompt, change folder to the installation path.
For example, cd C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\bin\Counters
Run the following commands to unload and load counters:
unamed instances unlodctr MSSQLServerOLAPService lodctr perf-MSSQLServerOLAPServicemsmdctr.ini
named instances unlodctr MSOLAP$Your_SSAS_NamedInstanceName lodctr perf-Your_SSAS_NamedInstanceNamemsmdctr.iniTip: Replace Your_SSAS_NamedInstanceName with the SQL Server Analysis Services named instance name. If you need to check the named instance name, use services.msc.
- Run the following command to parse all the performance libraries on the Windows server and refresh the performance counter classes on the Windows server: wmiadap /f
- Use wbemtest.exe to verify the WMI Classes exist.
WMI query failed: Invalid query. [0x80041017]
The columns returned by the WMI class are incomplete or unexpected.
Solution: On the Windows server to be monitored, update the WMI classes by running the following command at the command prompt: wmiadap.exe /f
See https://msdn.microsoft.com/en-us/library/windows/desktop/aa394603(v=vs.85).aspx for more information.
0x80014064 User credentials cannot be used for local connections
This error occurs when wmic command that ran locally on the target machine and credentials specified
The paging file is too small for this operation to complete. For Windows Server 2008 R2 you may find the following link useful: https://blogs.technet.microsoft.com/kevinholman/2010/06/09/wmi-leaks-memory-on-server-2008-r2-monitored-agents/
WMI query failed: Out of memory. [0x80041006]
- At the command prompt run “wbemtest”
- Connect to the “root” namespace (not “root\default”, just “root”)
- Click Open Instance. Specify “__ProviderHostQuotaConfiguration=@”
- Select Local Only for easier readability. You will see the threshold values.
- Increase the MemoryPerHost value to something greater. For example, double it (256 MB)
- Save Property
- Save Object
- Click Exit.
- Restart WMI services.
The wmic command has attempted to access a WMI class that does not exist.
Solution: Check the spelling of parameters on the wmic command.
Invalid Global Switch
The specified host, user or domain name contains special characters like ‘-‘ or ‘/’.
Solution: Modify the command by adding quotation marks.
wmic /node: “MonHostFQDN” /user: “DOMAIN\USER” path Win32_PerfRawData_PerfDisk_LogicalDisk get FreeMegabytes