Inventory Scan failure - WMI Service is Down / Disabled

 

Problem

You are unable to proceed with manual / scheduled Inventory Scanning and you get an error - "WMI Connection Failed"/"Asset Scan Locked" during the process.

Cause

Note: If you encounter the error message "Asset Scan is Locked," it indicates that dcinventory.exe has likely crashed. Please reach out to support for further assistance. 

You will encounter this error due to one or more of the following reasons:

  • Client machine is too slow due to reasons like high CPU/Memory utilization.
  • WMI is not configured properly.
  • WMI repository corrupted.
  • WMI Service Disabled

Resolution

  1. To check if WMI Service is running
  2. To check if WMI Repository is corrupted
  3. To perform a repair/re-sync of the WMI repository
  4. To rebuild your WMI repository

To check if WMI Service is running:

  • Open Services and check the "Windows Management Instrumentation" status is Running and startup type is Automatic

To check if WMI Repository is corrupted:

  • Run

    wbemtest

  • WMI repository is corrupted step 1

  • Connect to namespace root\cimV2
  • WMI repository is corrupted step 2

  • Select query and enter

    Select * from Win32_operatingsystem

  • WMI repository is corrupted step 3

  • The above image depicts healthy wmi repository
  • Incase error occurs in wbemtest, then rebuild/repair/resync the wmi repository.

To perform a repair/re-sync of the WMI respository:

Run the following commands in Command Prompt as administrator on the machine being monitored:

  • For Windows XP and Windows 2000 Servers:
      • To clear the WMI performance counter settings.

      winmgmt /clearadap

      • To stop the WMI Service.

      winmgmt /kill

      • To unregister the WMI service.

      winmgmt /unregserver

      • To register the WMI service.

      winmgmt /regserver

      • To re-synchronizes performance counters.

      winmgmt /resyncperf

  • For Windows 2003 Servers:
      • To recompile all MOF Files.

      wmiadap.exe /c

      • To reload the performance library and rebuilds the performance counters.

      wmiadap.exe /f

      • To reload all performance counters and their settings from the Windows registry.

      lodctr /R

  • For Windows 7 and Windows Server 2008:

      winmgmt /salvagerepository

To rebuild your WMI repository:

  • Disable and stop the winmgmt service
  • Remove or rename C:\Windows\System32\wbem\repository
  • Enable and start winmgmt service
  • Open command prompt as an administrator and execute the following commands:
        • C:\Windows\System32\wbem\

        • for /f %s in ('dir /b *.mof') do mofcomp %s

        • for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s

  • Open Performance Monitor to verify that all counters can be loaded

Note: If PERFMON generates a popup error, please follow this troubleshooting article.

Verification

After completing all the steps, Verify if WMI service is running in the services.

  • If the service is running, change the startup type to automatic
  • Restart the WMI service to proceed with asset scan

If the above settings are already configured:

  • Press Windows and R button to open RUN dialog, and enter

    wbemtest

  • Click Connect and select Query.
  • Execute the query

    Select * from Win32_operatingsystem

  • If this works, resume your inventory scan operation.
Unable to resolve this issue?
If you feel this KB article is incomplete or does not contain the information required to help you resolve your issue, upload the required logs, fill up and submit the form given below. Include details of the issue along with your correct e-mail ID and phone number. Our support team will contact you shortly and give you priority assistance and a resolution for the issue you are facing.


 * Mandatory Fields

Other KB articles 24/5 Support

Support will be available 24hrs a day and five days a week (Monday through Friday), excluding USA & India public holidays.

Tel : +1-888-720-9500
Email : endpointcentral-support@manageengine.com

Speak to us

  • Join the Endpoint Central Community, to get instant answers for your queries, register with our Forum.
  • Look out for the latest happenings in Desktop Management, follow our Tweets on Twitter.
  • Get to know the latest updates and Best Practices in Desktop Management through our Blog.

HeadingX