Server Manager 2012 : Configuration refresh failed with the following error: Invalid class RRS feed

  • Question

  • When we start Server Manager on Server 2012 the flag lights up Red almost immediately with the error:

    Configuration refresh failed with the following error: Invalid class. 

    What we’ve tried so far:  

    sfc /scannow  [reported no errors]

    Dism /Online /Cleanup-Image /RestoreHealth [Completed to 100% ]

    Get-windowsfeature returns: Invalid class

    This is a file/print server, running DFS.   When running DFS Management from Server Manager we don’t see the Replication section at the bottom.  We can run MMC and manually add DFS Management then Replication shows up. 

    Where do I look to start diagnosing this error?

    mercredi 16 octobre 2013 12:23


Toutes les réponses

  • I wanted to put the fix that I found on this thread since it's the first one that comes up in a web search, but didn't have the answer on it.

    1. from current directory (C:\Windows\System32) I did: dir /a /S *.mof then all *.mof's in all subdirs were listet.

    All are some type like "FFA7CB08C2CC2CB2D3973F6214D0CCAF.mof"

    2. cd C:\Windows\System32\wbem\AutoRecover

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

    4. goto Servermanager, do Refresh - Ok.

    • Marqué comme réponse BScholl samedi 16 novembre 2013 03:13
    vendredi 15 novembre 2013 15:52
  • Thank you!
    • Proposé comme réponse Randall Okwei lundi 5 octobre 2015 04:20
    samedi 16 novembre 2013 03:13
  • This worked magic for my Failover Cluster! thanks!!
    jeudi 12 décembre 2013 22:22
  • Thank you! I started having this issue when I attempted to uninstall the Windows Deployment Services role and I was stuck!
    vendredi 27 décembre 2013 16:05
  • Fixed for me, thank you so much! This problem has been plaguing us with a DC for months, and this has fixed it perfectly!
    lundi 16 juin 2014 10:57
  • Thanks a lot. It saved my day.

    L. Arshath

    mercredi 7 janvier 2015 09:13
  • Open Powershell with "Run As Admin"

    And run command ....

    Set-Item wsman:\localhost\Client\TrustedHosts YOURSERVERNAMEHERE -Concatenate -Force

    jeudi 5 février 2015 15:30
  • for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s

    this did it for me - thanks so much for sharing!!

    • Proposé comme réponse PedroTo mardi 6 décembre 2016 10:44
    lundi 9 mars 2015 18:41

    I tried this
    2. cd C:\Windows\System32\wbem\AutoRecover3. for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s

    and it worked great! Thank you so sooo much!

    mardi 19 mai 2015 13:02
  • I stand corrected. That worked yesterday for the first refresh right after doing it, but then it went back to failing. Today it's not working at all.

    This server was recently promoted to being a Domain controller, I'd like to keep it in good health. :(

    mercredi 20 mai 2015 12:48
  • I am so glad that I found this post and your answers.  I was having a problem with a Windows Server 2012 system that would not let Windows Update get past "Searching for Updates".  This would just hang for days until I rebooted.  All of the other Windows Updates fixes did not work.  I was so close to rebuilding this server.

    After I ran through the steps outlined, I rebooted the server and all of a sudden the Windowes updates started working again.

    Thank you so very much!

    mardi 2 juin 2015 00:41
  • Perfect!

    Works flawless with a HP ProLiant Cluster!


    mercredi 9 septembre 2015 09:18
  • this worked on a dell t 610, although the scripts been running for hours now.  stuck on it seems

    C:\Windows\System32\wbem\AutoRecover>mofcomp AC3687DA2224C8ED35AB56C9861A0C4B.mof
    Microsoft (R) MOF Compiler Version 6.3.9600.16384
    Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
    Parsing MOF file: AC3687DA2224C8ED35AB56C9861A0C4B.mof
    MOF file has been successfully parsed
    Storing data in the repository...

    Ironically this also fixed my hyper-v management console remote, and scvmm errors.


    dimanche 4 octobre 2015 21:48
  • Thank you StuffNThings, it worked like a charm on a Windows Server 2012 R2 Foundation.

    My two cents:

    1) Never run the same command from %windir%\system32\wbem, do it just from AutoRecover dir, because in wbem there are several MOFs to uninstall WMI providers, and run a recursive mofcomp will completely blow up your WMI (it's the way I blew mine).

    2) During the recursive mofcomp the program hanged once registering a specific mof (which file name I do not remember, alas). Closing Server Manager was not enough, I had to kill WMIPrvSe.exe from Task Manager to unblock it. I tried before to stop the WMI Service - sorry, no luck! - my WMI was in a so bad state that was impossible to stop it from Service Manager. Once killed WMIPrvSe.exe, the recursive mofcomp finished in no time, and the problem was solved.

    Due to this problem I could not open Backupassist console (neither 8.4.4 or 9.0, reinstalling did not solve the issue). Clearly BA console relies on WMI, so when WMI was back in shape, BA console opened again.

    Note that in several threads they warned me to keep deleting the WMI repository as a last measure, because it causes weird behavior in programs. I resisted the temptation to rebuild it, and my patience was rewarded with the lean solution I found here.

    lundi 5 octobre 2015 21:38
  • Hope someone can help here still

    When I type #3 it gives me an errors until I do it like this

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

    Then I get >> and a flashing cursor for hours and nothing happens

    I need to get this fixed without doing a new install

    What am I doing wrong?

    dimanche 21 février 2016 12:53
  • Don't do it in Powershell, open a CMD window



    cd C:\Windows\System32\wbem\AutoRecover

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

    Ignore next few lines, this app likes to insert this most likely due to the for statement data

    <object data-extension-version="" data-install-updates-user-configuration="true" id="__symantecPKIClientMessenger" style="display:none;"></object>

    <object data-extension-version="" data-install-updates-user-configuration="true" id="__symantecPKIClientMessenger" style="display:none;"></object>
    mardi 1 mars 2016 15:19
  • From current directory (C:\Windows\System32) I did: dir /a /S *.mof then all *.mof's in all subdirs were listet.

    All are some type like "FFA7CB08C2CC2CB2D3973F6214D0CCAF.mof"

    after that type cd C:\Windows\System32\wbem\AutoRecover

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


    • Proposé comme réponse Aanand Kumar mardi 1 mars 2016 15:29
    mardi 1 mars 2016 15:29
  • What people should be asking is why do the autorecover files have to be recompiled.  I believe I was able to recreate this issue.

    This was on 2012 and 2012R2 only.  2008R2 does not appear to be affected by this.

    1.  Navigate to C:\Windows\System32\wbem

    2.  Recompile all *.mof and *.mfl

    3.  Open ServerManager(SM).  This is where SM dies with invalid class


    1.  Navigate to C:\Windows\System32\wbem\AutoRecover

    2.  Recompile all *.mof and *.mfl

    3.  Open ServerManager.  SM is fixed

    <object data-extension-version="" data-install-updates-user-configuration="true" id="__symantecPKIClientMessenger" style="display:none;"></object>
    mardi 1 mars 2016 16:32

    This worked for me and it solved my FILE SERVER RESOURCE MANAGER problem as well.  I posted the solution with a screen shot (and credit :) )

    Have a great day.

    Ian Matthews

    mardi 12 juillet 2016 20:32
  • I can confirm that recompiling .mof & .mlf files in $env:windir\System32\webem\AutoRecover\ fixes this. I did not recompile the files one level up, nor did I do a recursive search.. Thank you to the recent few who mentioned recompiling only the ones in the AutoRecover directory.

    I wrote this snippet in PowerShell, which fixed it for me. Proceed at your own risk:

    $AutoRecoverPath = "$env:windir\System32\wbem\AutoRecover\"
    Write-Output "Getting AutoRecover MOFs to recompile."
    $GetAutoRecoverMOFS = Get-ChildItem -Path $AutoRecoverPath | Where-Object { ($_.Extension -in ".mof", ".mfl") -and ($_.Name -notlike "*uninstall*") } | Sort-Object -Property Name
    Write-Output "Checking syntax of MOFS in $AutoRecoverPath"
    $c = 1
    foreach ($file in $GetAutoRecoverMOFS) {
    	$FileName = $file.Name
    	$FilePath = $file.FullName
    	Write-Output "Recompiling $FileName. $c of $($GetAutoRecoverMOFS.Count)."
    	C:\Windows\System32\wbem\mofcomp.exe -check $FilePath
    Write-Output "Recompiling MOFS in $AutoRecoverPath"
    $c = 1
    foreach ($file in $GetAutoRecoverMOFS) {
    	$FileName = $file.Name
    	$FilePath = $file.FullName
    	Write-Output "Recompiling $FileName. $c of $($GetAutoRecoverMOFS.Count)."
    	C:\Windows\System32\wbem\mofcomp.exe -autorecover $FilePath

    • Proposé comme réponse ScottMetzel jeudi 25 août 2016 17:54
    • Modifié ScottMetzel jeudi 25 août 2016 17:56
    lundi 22 août 2016 19:58
  • Can you please explain line 3?

    an example would be great.


    dimanche 12 mars 2017 20:56
  • Can you please explain line 3?

    an example would be great.


    Sure. Line 3 gets all .mof & .mfl files in %windir%\System32\wbem\AutoRecover\ where the file name does not include the word "uninstall", and sorts those results by the (file) name property.

    I should mention that doing any of this should be an absolute last ditch effort to resolve anything WMI-related, and to date I've only had to do this once. Typically, doing anything like this is unnecessary and probably isn't the root cause.

    mardi 14 mars 2017 02:02
  • Thank you for this.  Saved me a lot of time.
    lundi 10 juillet 2017 22:33
  • Thanks a lot, it works!
    vendredi 6 octobre 2017 09:49
  • You saved me a ton of work.  My fifteen year old domain in a computer lab was completely kaput.  I used csvde to save what I could and was ready to blow up the entire domain (I had already taken the BDC offline and could not re-add it to the domain).  There is a ton of work left to do, but at least I save recreating every computer and user in the school.

    vendredi 13 octobre 2017 18:32
  • excuse my ignorance, I do not understand the command below to be typed.

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

    4. goto Servermanager, do Refresh - Ok.

    lundi 30 octobre 2017 20:29
  • worked get for me, Thank you
    mardi 28 novembre 2017 22:16
  • Works in Server 2016 too.


    mardi 27 février 2018 10:38
  • Great solution.

    Worked like a charm

    Server 2012 R2, error was:
    configuration refresh failed with the following error invalid class

    Thank you very much!!!


    mardi 24 juillet 2018 12:48
  • If above doesn't work, try this

    CD C:\Windows\System32\WBEM
    dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s


    Worked like a charm

    • Proposé comme réponse Vivek123321 jeudi 8 novembre 2018 23:02
    jeudi 8 novembre 2018 23:02
  • this does not work for me 
    samedi 1 décembre 2018 14:08
  • This fixed it for me!!.. Thank you
    mardi 2 avril 2019 05:39
  • tks!

    Abraços, Marcelo Washington do Nascimento

    mardi 21 mai 2019 12:20
  • I experienced the same issue after an in-place upgrade from 2012R2 to 2019. 

    Event Viewer: 

    Log Name: Microsoft-Windows-ServerManager-MultiMachine/Operational
    Invoke method error. Server: localhost, Namespace: root\microsoft\windows\servermanager, Class: MSFT_ServerManagerTasks, Method: GetServerInventory, Error: Invalid class 

    Based on the comment from BScholl I searched in the C:\Windows\System32\wbem\AutoRecover directory for "MST_ServerManagerTasks". 

    On my "Server 2019 Standard" the following files contained a reference to the "MSFT_ServerManagerTasks" class. 


    I then fixed the problem by running mofcomp on the relevant files. 

    Start CMD as administrator
    CD C:\Windows\System32\wbem\AutoRecover
    mofcomp 1A75D0C6C8797FE7E2BA5DB1C1C45E36.mof
    mofcomp 888AA37E798ACCB4B59BA10D5D95BEAB.mof
    mofcomp AC3687DA2224C8ED35AB56C9861A0C4B.mof
    mofcomp E0B2C6C98636BD24232F0D4B79550F05.mof

    mercredi 9 octobre 2019 09:20
  • OS 2016.


    1. from current directory (C:\Windows\System32) I did: dir /a /S *.mof then all *.mof's in all subdirs were listet.

    All are some type like "FFA7CB08C2CC2CB2D3973F6214D0CCAF.mof"

    2. cd C:\Windows\System32\wbem\AutoRecover

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

    4. goto Servermanager, do Refresh - Ok.

    -- Found Invalid class error replaced with "Configuration refresh failed with the following error: The system cannot find file specified."

    -- Reboot, sfc scannow, chkdsk all workaround performed.

    -- Any suggestion/solution on this?

    samedi 26 octobre 2019 11:05
  • Spot on. Thank you!

    vendredi 7 février 2020 15:08
  • this is the only process that worked for me -- i.e. doing the "for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s" in "C:\Windows\System32\wbem" first, and then doing it in C:\Windows\System32\wbem\AutoRecover 2nd.


    mercredi 15 avril 2020 15:56
  • Puedes ir a esta ruta:



    Renombrar la carpeta: ServerComponentCache por: ServerComponentCache-bak

    Reiniciar el server y listo

    Probamos que el Server Manager Funcione....

    Después de reiniciar en el regedit quedara algo asi:

    • Modifié gmorales mardi 5 mai 2020 21:27
    mardi 5 mai 2020 20:22