You are here: Home > Products > Network Inventory Explorer > User Manual > How to Fix/Restore Broken WMI

How to Fix/Restore Broken WMI

Sometimes, WMI stops working after a system update (on your or remote PC). If all computers are not polled from your PC via WMI, the problem is likely on your PC. If only some computers are not polled from your PC, WMI can be broken on those PCs.

If WMI has stopped working try to fix it using the following instruction. Create a .bat file containing the commands listed below and run it on the problem PC where WMI is not working.

1. Fixing the WMI Libraries' Registration

cd %windir%\system32\wbem

for %%i in (*.dll) do RegSvr32 -s %%i

regsvr32 -s scrcons.exe
regsvr32 -s unsecapp.exe
regsvr32 -s wbemtest.exe
regsvr32 -s winmgmt.exe
regsvr32 -s wmiadap.exe
regsvr32 -s wmiapsrv.exe
regsvr32 -s wmiprvse.exe

2. Fixing the Repository

net stop winmgmt /y
cd %windir%\system32\wbem
rename repository repository_bad
net start winmgmt
VER | FINDSTR /L "6." > NUL
IF %ERRORLEVEL% EQU 0 winmgmt /salvagerepository
VER | FINDSTR /L "5.2." > NUL
IF %ERRORLEVEL% EQU 0 rundll32 wbemupgd, RepairWMISetup
VER | FINDSTR /L "5.1." > NUL
IF %ERRORLEVEL% EQU 0 rundll32 wbemupgd, UpgradeRepository

See also: WMI data collection method, WMI access troubleshooting guide, WMI polling errors, FAQ

 

Related Links: