WMI Error 0x80040154 (Class Not Registered): Meaning, Checks and a Registry Fix

Commands such as wmic service get Name,State or Get-WmiObject Win32_OperatingSystem fail with WMI error 0x80040154, and anything that relies on WMI breaks with them? The code means Windows was asked for a COM class that is not registered. Start with the read-only checks below to see whether the WMI repository itself is healthy. If it is, the registry repair for the WmiPrvSE COM entries that brought WMI back on a Windows 7 machine is described step by step, with a backup first.

Advertisements

How this guide was made: it is compiled from Microsoft Learn documentation, Microsoft Q&A threads and a Seven Forums thread, checked on December 1, 2026; user-posted fixes are labelled as such.

0x80040154: WMI class not registered

What WMI error 0x80040154 means

Error 0x80040154 is the HRESULT REGDB_E_CLASSNOTREG, which means the COM class being requested is not registered ([MS-ERREF]: HRESULT Values). A related code, 0x80040152 (REGDB_E_KEYMISSING), means a registry key could not be found. The Configuration Manager error reference lists 0x80040154 as “Class not registered” from the Windows error source (Application installation error codes reference). The same page says DCOM registrations and permissions are critical for WMI operations to succeed.

Microsoft documents the code and the general WMI checks. The Windows 7 repair for missing WmiPrvSE registrations further down comes from a user post on Seven Forums, not from Microsoft.

Checks to run first

These steps come from Microsoft’s Configuration Manager guidance, so they are written for that setting. They are read-only or low-risk, and they show whether the WMI repository itself is the problem. Run them from an elevated command prompt.

  1. Run winmgmt /verifyrepository to verify the WMI repository.
  2. Only if verification finds problems, try winmgmt /salvagerepository.
  3. Avoid /resetrepository unless nothing else is left to try, because the guidance gives no undo for it.
  4. Run wbemtest to open the Windows Management Instrumentation Tester. Set superclass info to Recursive and select OK to confirm classes are listed. Then open a class’s object editor and select Instances to confirm instances load. Some classes have no instances, and that’s fine as long as the Query Result window says Done. A query that never finishes may point to a problem.
  5. Run wmimgmt.msc, open Action then Properties, and use the Security tab to see the namespaces listed and review their security.

Repository verification is typically most useful for invalid class errors, especially if a .mof file was recently recompiled with mofcomp. Some namespaces do not rebuild automatically. For those, reinstall the associated software or run mofcomp on the application’s .mof files.

The same guidance says to review DCOM settings with dcomconfig. If a specific problematic .dll file is identified, register it with regsvr32 and retry. A large number of problematic files may point to an underlying issue that has to be fixed first. The regsvr32 reference lists Windows 10, Windows 11 and Windows Server 2016 through 2025 (and Azure Local 2311.2 and later) in its Applies to list, not Windows 7. To undo a registration, the /u switch unregisters the server.

Advertisements

User-reported fix: restore the WmiPrvSE COM registrations on Windows 7

This fix is one user’s report, and Microsoft has not confirmed it. It comes from a single Windows 7 Ultimate x64 SP1 (Build 7601) installation with Windows Management Framework 5.1, described in the Seven Forums thread.

What the user saw

  • WMI queries failed with COMException 0x80040154 (REGDB_E_CLASSNOTREG).
  • Both Get-WmiObject Win32_OperatingSystem and wmic service get Name,State failed.
  • tasklist returned an error saying the remote system must be running Windows 2000 or above.
  • WMIDiag reported no missing WMI repository or system files, but found a missing DCOM registration for WmiPrvSE.exe.
  • WBEMTEST could still connect to root\cimv2 and list its classes.

What the user ruled out

  • The WMI repository verified as consistent before the fix.
  • SFC and CheckSUR repairs ran, and a later SFC scan found no integrity violations, but the problem remained.
  • Re-registering WMI-related DLLs with regsvr32 did not help.
  • Recompiling MOF files did not help.

The user concluded that on this installation the cause was two missing or incomplete WMI Provider Subsystem Host COM registrations, not the repository or system files. If you see the same symptoms, the user advises checking these two CLSIDs and their LocalServer32 registrations before rebuilding the WMI repository or recompiling all MOF files.

Before you edit the registry

A wrong registry edit is hard to undo, so back up the keys involved before you touch them. Then look at what exists on your own system instead of importing the entries blindly. The steps below show what was missing on that user’s machine, and yours may differ.

Fix A: WMI Provider Subsystem Host

On the user’s PC the key HKLM\SOFTWARE\Classes\CLSID\{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} existed, but its LocalServer32 subkey was missing.

  1. Only if the key is owned by TrustedInstaller and Administrators has read-only access: the user took ownership and granted Administrators Full Control before editing. This changes permissions on a system key, so note the original owner first.
  2. Restore the default value of the LocalServer32 subkey so it points to WmiPrvSE.exe:
    reg add "HKLM\SOFTWARE\Classes\CLSID\{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4}\LocalServer32" /ve /t REG_SZ /d "\"%windir%\System32\wbem\WmiPrvSE.exe\"" /f
  3. Set the ServerExecutable value under the same subkey:
    reg add "HKLM\SOFTWARE\Classes\CLSID\{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4}\LocalServer32" /v ServerExecutable /t REG_SZ /d "%windir%\System32\wbem\WmiPrvSE.exe" /f

Fix B: WMI Provider Subsystem Secured Host

On the user’s PC the whole key HKLM\SOFTWARE\Classes\CLSID\{1F87137D-0E7C-44d5-8C73-4EFFB68962F2} was missing, so the user recreated it in four steps.

  1. Recreate the default value as Microsoft WMI Provider Subsystem Secured Host:
    reg add "HKLM\SOFTWARE\Classes\CLSID\{1F87137D-0E7C-44d5-8C73-4EFFB68962F2}" /ve /t REG_SZ /d "Microsoft WMI Provider Subsystem Secured Host" /f
  2. Set AppID to the CLSID itself:
    reg add "HKLM\SOFTWARE\Classes\CLSID\{1F87137D-0E7C-44d5-8C73-4EFFB68962F2}" /v AppID /t REG_SZ /d "{1F87137D-0E7C-44d5-8C73-4EFFB68962F2}" /f
  3. Set the LocalServer32 default value to WmiPrvSE.exe with the -secured argument:
    reg add "HKLM\SOFTWARE\Classes\CLSID\{1F87137D-0E7C-44d5-8C73-4EFFB68962F2}\LocalServer32" /ve /t REG_SZ /d "\"%windir%\System32\wbem\WmiPrvSE.exe\" -secured" /f
  4. Set the ServerExecutable value under that subkey:
    reg add "HKLM\SOFTWARE\Classes\CLSID\{1F87137D-0E7C-44d5-8C73-4EFFB68962F2}\LocalServer32" /v ServerExecutable /t REG_SZ /d "%windir%\System32\wbem\WmiPrvSE.exe" /f

How the user verified it

The user ran powershell -NoProfile -Command "Get-WmiObject Win32_OperatingSystem | Select-Object Caption,Version". It returned Microsoft Windows 7 Ultimate with version 6.1.7601. The user also reports that Win32_ComputerSystem, Win32_Service, wmic and tasklist (including tasklist /svc) all worked afterwards.

Advertisements

Other user reports that mention 0x80040154

These community posts are about other situations, and Microsoft has confirmed none of them.

Details to gather before you ask for help

  • Your Windows version and build, and whether Windows Management Framework is installed.
  • Which commands fail and the exact message, for example the COMException text or the tasklist error.
  • The result of winmgmt /verifyrepository.
  • Whether wbemtest connects to root\cimv2 and lists classes.
  • Whether the two CLSID keys above exist on your PC and whether each has a LocalServer32 subkey.
  • Whether a .mof file was recently recompiled, and which repairs you have already run.

If you need WMI logs, increase the default WMI log size so it covers the whole troubleshooting session. Disable the trace and debug logging you turned on once you finish.

Sources

Advertisements

Leave a Comment