WMI not working on win10 - all related services broken

Morten Knudsen 0 Reputation points
2025-02-11T14:00:00.6+00:00

Hello all,

1)

PS C:\Windows\System32> Get-WmiObject -Class Win32_Product

Get-WmiObject : Invalid class "Win32_Product"

At line:1 char:1

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

winmgmt /verifyrepository results in a return of WMI repository is consistent, so it doesn't appear to be corrupt.

  1. Another test my pc: Get-ComputerInfo -Property "*version"

WindowsCurrentVersion : 6.3

WindowsVersion : 2009

BiosBIOSVersion :

BiosEmbeddedControllerMajorVersion :

BiosEmbeddedControllerMinorVersion :

BiosSMBIOSBIOSVersion :

BiosSMBIOSMajorVersion :

BiosSMBIOSMinorVersion :

BiosSystemBiosMajorVersion :

BiosSystemBiosMinorVersion :

BiosVersion :

OsVersion :

OsCSDVersion :

OsServicePackMajorVersion :

OsServicePackMinorVersion :

coworker similar pc: Get-ComputerInfo -Property "*version"                                                                

 

WindowsCurrentVersion              : 6.3 WindowsVersion                     : 2009 BiosBIOSVersion                    : {LENOVO - 1400, N30ET57W (1.40 ), Lenovo - 1400} BiosEmbeddedControllerMajorVersion : 1 BiosEmbeddedControllerMinorVersion : 17 BiosSMBIOSBIOSVersion              : N30ET57W (1.40 ) BiosSMBIOSMajorVersion             : 3 BiosSMBIOSMinorVersion             : 2 BiosSystemBiosMajorVersion         : 1 BiosSystemBiosMinorVersion         : 40 BiosVersion                        : LENOVO - 1400 OsVersion                          : 10.0.19045 OsCSDVersion                       : OsServicePackMajorVersion          : 0 OsServicePackMinorVersion          : 0

Issue seem similar to: WMI registry issues that can't be resolved by resetting the WMI - Microsoft Community

Any inputs how to recover PC (without reinstalling windows)

Any inputs are welcome - thanks

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,078 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,965 questions
Microsoft Configuration Manager Updates
Microsoft Configuration Manager Updates
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Updates: Broadly released fixes addressing specific issue(s) or related bug(s). Updates may also include new or modified features (i.e. changing default behavior).
1,109 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XinGuo-MSFT 21,276 Reputation points
    2025-02-12T02:28:43.2933333+00:00

    Hi,

    It looks like you're encountering an error with the Get-WmiObject cmdlet. The "Invalid class" error typically occurs when the specified WMI class is not available or not registered correctly on your system.

    Here are a few steps you can try to resolve this issue:

    1. Verify WMI Repository: Run the following command in an elevated Command Prompt to check if the WMI repository is consistent:
       winmgmt /verifyrepository
    

    If it returns "Repository is inconsistent," you can try to repair it with:

       winmgmt /salvagerepository
    
    1. Re-register WMI Components: You can re-register the WMI components by running the following commands in an elevated Command Prompt:
       cd /d %windir%\system32\wbem
       for %i in (*.dll) do regsvr32 -s %i
       for %i in (*.exe) do %i /RegServer
    
    1. Recompile MOF Files: Recompile the MOF files to ensure all necessary classes are registered:
       cd /d %windir%\system32\wbem
       for %i in (*.mof, *.mfl) do mofcomp %i
    
    1. Check for Missing or Corrupt Files: Sometimes, missing or corrupt system files can cause this issue. Run the System File Checker tool:
       sfc /scannow
    

    If these steps don't resolve the issue, it might be helpful to check the Windows Application log for any WMI-related errors or events.

    Let me know if you need further assistance!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.