WMI errors while installing the Windows Roaming Client
If you're running into errors like WMI 'ExecQuery' failed
or Service DNS Agent failed to start
, you're not alone—these are often symptoms of issues with WMI on the local machine.

Here are the top things to check if you’re seeing this during installation:
🔍 Common Symptoms
- Agent installs but fails to start
- “Verify that you have sufficient privileges to start the system services” messaging
- Errors related to invalid WMI classes
- DNS service doesn’t respond after agent install
🔧 Steps That Helped Other Users
➡️ Run a system check:
sfc /scannow
DISM.exe /Online /Cleanup-image /Scanhealth
DISM.exe /Online /Cleanup-image /Restorehealth
➡️ Check WMI health:
Run wmimgmt.msc
and right-click WMI Control (Local) > Properties. If you get an "Invalid class" error, the WMI repository may be corrupted.
Run winmgmt /verifyrepository
to verify the integrity of the WMI.
➡️ Recompile Mof files for WMI errors:
This command attempts to re-register key files for WMI functionality. Run from an elevated command prompt:
cd C:\Windows\System32\Wbem
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
for %i in (*.dll) do regSvr32 -s %i
net stop winmgmt /y
net start winmgmt
gpupdate /force
➡️ Rebuild WMI:
sc config winmgmt start= disabled
net stop winmgmt
Winmgmt /salvagerepository %windir%\System32\wbem
Winmgmt /resetrepository %windir%\System32\wbem
sc config winmgmt start= auto
➡️ As a last resort, rename the repository folder and trigger a rebuild via the WMI Control panel:
Rename %windir%\System32\wbem\repository
to repository.old
. Reboot and reopen WMI Control to trigger auto-rebuild.
🧐 Additional Troubleshooting
See these external guides for more detail and further troubleshooting.
- Missing, failed, or invalid WMI class
- Microsoft Community generated cmd and PowerShell fixes
- Troubleshooting WMI connectivity issues
- Detailed steps to check WMI health and enable event tracing
💬 Got past a different WMI issue? Share your steps or tips in the comments to help other users!
Please sign in to leave a comment.
Comments
0 comments