WMI registry issues that can't be resolved by resetting the WMI registry - Windows 10

Anonymous
2024-12-27T16:06:41+00:00

This issue is occurring in a Windows 10 environment.

I've had an issue arise in our environment that our application deployment and inventory tool is showing inaccurate data for around 10 percent of the workstations in our environment. The support for this tool has identified the issue as relating to the WMI registry, and punted at that point claiming it outside of their scope. The issue was confirmed with the test of running the command and getting the error response in an elevated PowerShell window below:

PS C:\WINDOWS\system32> Get-WmiObject -Class Win32_Product

Get-WmiObject : Generic failure

At line:1 char:1

  • Get-WmiObject -Class Win32_Product
  • 
        + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException 
    
        + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand 
    
    

At this point, I searched on WMI registry issues, and found the typical documented processes for checking the WMI registry, and resetting if necessary.

I've also tried other basic troubleshooting steps to fix system issues, like running sfc /scannow

I have found that running the command of winmgmt /verifyrepository results in a return of WMI repository is consistent, so it doesn't appear to be corrupt. However, under direction of Microsoft support, I completed a reset of the WMI registry with the below process:

  1. Disable and stop the WMI service:

sc config winmgmt start= disabled

net stop winmgmt

  1. Navigate to the WBEM folder:

cd %windir%\system32\wbem

  1. Rename the repository folder:

   rename repository repository.old

  1. Re-enable the WMI service:

   sc config winmgmt start= auto

  1. Recompile all default WMI .mof and .mfl files:

cd %windir%\system32\wbem

for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s

  1. Reboot the system.

This process appears to have completed successfully, however, the problem has persisted, and I still get the same error in PowerShell as documented above.

At this point, Microsoft support guided me in doing a repair install of Windows 10 on the effected laptop. The repair install completed successfully, but the issue persists.

This issue occurs no matter who is signed into the laptop, so it isn't tied to a profile.

This is normally the point where the answer would be to give up on the Windows install and just wipe/reinstall Windows. However, that is not an acceptable answer when dealing with 10 percent of our workstations. Also, given the frequency of this occurring, I expect it to continue occurring until we find the root cause of this, and reimaging laptops anytime this problem occurs is not an acceptable solution.

I'm a bit surprised that the repair install didn't resolve the issue. We know the issue isn't in a user profile, and the repair install should have put a new set of system files on the laptop. What is left that wouldn't have been reset?

My thoughts at this point are that perhaps the All Users profile holds onto it's settings in the reset, and it lies in there - would that make sense? Is there a process to reset the All Users profile?

Or does anyone have any other ideas or suggestions on this issue?

***moved from Windows / Windows 10 / Performance and system failures***

Windows for business | Windows Client for IT Pros | Directory services | User logon and profiles

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2024-12-30T02:14:17+00:00

    Hello,

    Thank you for posting in the Microsoft Community Forums.

    Since the problem persists even after a repair install of Windows, it suggests that there might be deeper issues at play.

    Here are some potential avenues to explore:

    1. Check for Namespace Corruption:

    Sometimes specific namespaces within WMI can be corrupted. You can use the winmgmt command to check for and repair namespace issues.

    winmgmt /salvagerepository

    Then reboot and test again.

    1. Rebuilding WMI Repository:

    You’ve already tried renaming the repository and recompiling .mof and .mfl files, which usually addresses repository issues. However, there’s another method involving the complete reinstallation of the WMI service.

    cd %windir%\system32\wbem

    rmdir /s /q repository

    winmgmt /resyncperf

    Reboot and test again.

    1. Check for DCOM Issues:

    Sometimes DCOM settings can affect WMI. Ensure that DCOM is enabled:

    1. Open dcomcnfg.
    2. Go to Component Services > Computers > My Computer.
    3. Right-click My Computer and select Properties.
    4. Go to the Default Properties tab.
    5. Ensure Enable Distributed COM on this computer is checked.
    6. Check and Repair Components Store:

    Using DISM to check and repair the component store might help:

    DISM /Online /Cleanup-Image /CheckHealth

    DISM /Online /Cleanup-Image /ScanHealth

    DISM /Online /Cleanup-Image /RestoreHealth

    Then reboot and test again.

    1. Investigate Software Conflicts:

    There may be third-party software that interferes with WMI. Review recently installed software or updates and consider removing any that coincide with the start of the problem.

    I hope the information above is helpful.

    Best regards

    Yanhong Liu

    0 comments No comments
  2. Anonymous
    2025-01-02T18:10:55+00:00

    Thanks for your response. Unfortunately, none of these worked:

    1. This is a step I had previously tried based on articles about the WMI registry. It didn't work. I did try it again for good measure, it still didn't work.
    2. I followed these steps and rebooted - the error persists.
    3. I verified that "Enable Distributed COM on this computer" is checked, has been checked, and is still checked.
    4. I've run these steps. No corruption was found. After rebooting, the error persists.
    5. This laptop is not running any unusual or extra software. All software on this laptop is running on all laptops in our environment. I believe I have ruled out a software conflict being the problem.

    Nothing has worked, my initial questions stand.

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2025-01-15T12:38:54+00:00

    This thread demonstrates a sad reality......no one seems to understand anything about what WMI is, or how it works.

    No one has been able to offer any insight whatsoever to this part of Windows, and Microsoft's own support is so grossly untrained and incompetent that attempting to work with them is a futile exercise in being led around in circles checking basic logs with no sign of getting anywhere close to where the problem even lies.

    Has all knowledge of the inner workings of Windows been lost to time already? Not even Microsoft knows how Windows works anymore?

    0 comments No comments
  4. Anonymous
    2025-02-07T13:08:06+00:00

    Same issue on a ThinkPad T15 - having same frustrations on that no root cause can be found.

    I cannot even try safe mode at boot due to manage-bde will not give bitlocker key.
    I cannot see anything in "System Information". All tools using WMIC is failing.

    0 comments No comments
  5. Anonymous
    2025-02-11T12:12:14+00:00

    Did you find at solution / work around?

    0 comments No comments