cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Lansweeper
Lansweeper Tech Support
Lansweeper Tech Support

TL;DR-Sweepy-Icon (1).png
This page explains how to repair a corrupt WMI installation so that Lansweeper can scan your Windows computer's data.


Lansweeper pulls Windows computer data from WMI (Windows Management Instrumentation), a management framework built into Windows operating systems. If WMI is corrupt on a Windows computer, Lansweeper will be unable to scan the machine and you may see errors like the ones below on the computer's Lansweeper webpage. These errors are generated by WMI itself and can generally be resolved by performing a WMI repair.

Corrupt LsPush file, repair WMI on this computer! The interface is unknown Invalid class Invalid namespace \root\cimv2 Invalid namespace \root\default Invalid query Provider load failure Specified cast is not valid The specified module could not be found Value does not fall within the expected range The executable program that this service is configured to run in does not implement the service The service did not respond to the start or control request in a timely fashion

windows-wmi-corrupt-error.jpg

Below are several options you can try to repair WMI on a client machine. Reboot the client computer after each step and verify whether the issue has been resolved by rescanning the machine.
One way to rescan is by clicking the Assets link at the top of the web console, ticking the checkbox in front of the asset and selecting the Rescan button on the left. Wait for the Last Successful Scan or Last Scan Attempt date listed in the Summary tab of the computer webpage to update, indicating that a new scan attempt has taken place.

Run the script and commands below at your own risk, as they may affect other applications. To double-check that WMI on a client machine is actually corrupt before attempting a repair, scan the machine with the LsPush scanning agent.
If LsPush cannot retrieve data from the client machine either, WMI is corrupt.
If LsPush can retrieve data, WMI is not corrupt and any scanning errors you may be getting during agentless scanning are caused by something else, e.g. a firewall or incorrect credential.
  • Run this script on the client machine that's generating the WMI corruption errors. It recompiles all .mof WMI files found in the %windir%\System32\Wbem\Repository folder.
  • Execute the commands below in an elevated Command Prompt on the client machine that's generating the WMI corruption errors. This is an alternate way of resetting the WMI repository to the initial state when the operating system was first installed.
    Winmgmt.exe /standalonehost
    Winmgmt.exe /resetrepository
  • Execute the command below in an elevated Command Prompt on the client machine that's generating the WMI corruption errors. It checks the integrity of Windows operating system files and attempts to repair errors it finds.
    sfc /scannow
  • If all else fails, reinstall the Windows operating system on the client machine that's generating the WMI corruption errors.
Was this article helpful? Yes No
100% helpful (4/4)

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now
Version history
Last update:
‎06-04-2024 04:34 PM
Updated by: