Submit a ticketCall us

WebinarVisual Monitoring Tactics: Getting More Log Search Value from SolarWinds Log & Event Manager with nDepth Webcast

Do things seem to make more sense when they are visualized? Are you an IT professional or security expert with a wish for more cybersecurity tools that provide an intuitive visual experience? Join Alexis Horn and Jamie Hynds from SolarWinds as they demonstrate how the nDepth feature in LEM can help make visualizing log search results a reality.

Register now.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Windows Service Monitor returns 'Invalid Query'

Windows Service Monitor returns 'Invalid Query'


The Windows Service Monitor fails with one of the following errors:

  • Invalid query
  • Invalid class


The following Windows Management Instruments (WMI) classes are used by SAM for Windows Service Monitor:

  • Win32_Service - To monitor the status of the service.
  • Win32_PerfRawData_PerfProc_Process - To monitor the use of resources (CPU and memory).
  • Win32_Process

As part of the resolution, you may need to rebuild the performance counters on your target machine. Information is provided in the resolution steps.



  • All versions of Windows
  • All versions of SAM


The issue is caused when the following Windows Management Instruments (WMI) class is missing:



Reregister PerfMonCounters and WMI classes on your target machine/node:

  1. Open an elevated CMD
  2. Reregister the PerfMonCounters and WMI Classes.

a. Open an elevated CMD window on the target system.

b. Go to the following directory:


c. Type the following commands:

lodctr /R
wmiadap.exe /f

  1. If the WMI class is still missing, ensure that the following is not set and enabled in the registry:
KEY: “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PerfProc\Performance”
Field: “Disable Performance Counters”
Value: 1
  1. If the entry is found and the value set to 1, set it to 0 and reboot the system.

You may also need to rebuild the performance counters. For information and instructions for rebuilding performance counters, see this Microsoft KB Article for Windows 2008:

Please note: This is a third party link that may change.


* Please Note: This workaround has resolved this Error Message for a number of customers but if the above solution does not work on your Device we will require you to reach out to Microsoft for further troubleshooting as to why the class is not being provided by WMI. 



Last modified