Answered by:
Server Manager 2012 : Configuration refresh failed with the following error: Invalid class

-
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?
Question
Answers
-
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.
- Marked as answer by BScholl Saturday, November 16, 2013 3:13 AM
-
Hi,
Regarding the current issue, please try to refer to the following similar thread for troubleshooting.
Server Manager Refresh Failure
Regarding how to troubleshoot the Server Manager issue, please refer to the following articles.
Windows Server 2012 - Server Manager Troubleshooting Guide
Hope this helps.
Best Regards,
Andy Qi
- Marked as answer by Andy QiModerator Monday, October 28, 2013 5:29 PM
All replies
-
Hi,
Regarding the current issue, please try to refer to the following similar thread for troubleshooting.
Server Manager Refresh Failure
Regarding how to troubleshoot the Server Manager issue, please refer to the following articles.
Windows Server 2012 - Server Manager Troubleshooting Guide
Hope this helps.
Best Regards,
Andy Qi
- Marked as answer by Andy QiModerator Monday, October 28, 2013 5:29 PM
-
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.
- Marked as answer by BScholl Saturday, November 16, 2013 3:13 AM
-
Thank you!
- Proposed as answer by Randall Okwei Monday, October 5, 2015 4:20 AM
-
-
-
-
-
-
-
-
-
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!
-
-
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.
Kudos!!!!!
-
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.
-
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?
-
Don't do it in Powershell, open a CMD window
c:
cd\
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="0.4.0.129" data-install-updates-user-configuration="true" id="__symantecPKIClientMessenger" style="display:none;"></object>
<object data-extension-version="0.4.0.129" data-install-updates-user-configuration="true" id="__symantecPKIClientMessenger" style="display:none;"></object>- Edited by jbruns2010 Tuesday, March 1, 2016 3:20 PM
-
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
DMG
- Proposed as answer by Aanand Kumar Tuesday, March 1, 2016 3:29 PM
-
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
Now
1. Navigate to C:\Windows\System32\wbem\AutoRecover
2. Recompile all *.mof and *.mfl
3. Open ServerManager. SM is fixed
<object data-extension-version="0.4.0.129" data-install-updates-user-configuration="true" id="__symantecPKIClientMessenger" style="display:none;"></object>
-
THANK YOU!
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 www.urtech.ca www.commodore.ca
-
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 $c++ } 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 $c++ }
- Proposed as answer by ScottMetzel Thursday, August 25, 2016 5:54 PM
- Edited by ScottMetzel Thursday, August 25, 2016 5:56 PM
-
-
Can you please explain line 3?
an example would be great.
Thanks
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.
-
-
-
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.
-
-
-
-
-
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
Source:
http://wintech.sgal.info/2017/08/configuration-refresh-failed-invalid-class.htmlWorked like a charm
- Proposed as answer by Vivek123321 Thursday, November 8, 2018 11:02 PM
-