Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

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