Today, I had problem installing CM client on a machine. Both manual install and client push methods did not work. I checked the ccm.log file on the SCCM server and found this error.
The error code indicates that the WMI repository on the client is broken. In order to fix this error, we have to rebuild the WMI repository.
I run the Windows commmand (cmd.exe) as a local administrator and try these commands.
- winmgmt /verifyrepository
- winmgmt /salvagerepositor
The first command checks for the consistency of the WMI repository and the second command rebuilds the repository if an inconsistency is detected.
However, these commands do not fix the problem for me. So I end up with rebuilding the WMI repository manally by follow these steps.
- Change the startup type of the Windows Management Instrumentation to Disabled and stop this service
- Go to %windir%\System32\wbem and rename the Repository folder to Repository.bak
- Run the cmd.exe as administrator and CD to %windir%\System32\wbem
- Run for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
- Change the startup type of the Windows Management Instrumentation back to Automatic
- In the cmd.exe windows, run cd /d C:\ to go back to the root of the C drive
- Run for /f %s in (‘dir /s /b *.mof *.mfl’) do mofcomp %s
- Reboot the machine
After reboot the machine, I push the CM client to the machine again and it works. Yay!