Recently moving my SCCM Clients to a new SCCM Primary Site.
NP – these clients sit in an untrusted domain.
Used the CCMClean tool to clean up all traces of the old SCCM Client. Then installed the new SCCM Client successfully.
For a handful of clients, the above process wouldnt work.
Errors in the logs indicated a corrupt WMI Repository.
Below details how to fix a corrupted WMI Repository.
Solution:
Stop SMS Agent Host.
net stop cmmexec
Stop WMI Service.
net stop winmgmt
Delete WMI Repo.
rmdir /s /q %WINDIR%\System32\wbem\repository
Start WMI Service.
net start winmgmt
Start SMS Agent Host.
net start cmmexec
Install the SCCM Client.