Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

How To Fix WMI Corruption

- - - - -

  • Please log in to reply
7 replies to this topic

#1
RYU81

RYU81

    Member

  • Member
  • PipPip
  • 288 posts
  • Joined 02-June 04
WMI not working for me.

Posted Image
Images in signatures shall NOT exceed a total of 300x100 and 80kb.


How to remove advertisement from MSFN

#2
Arie

Arie

    One Man Army

  • Member
  • PipPipPipPipPip
  • 835 posts
  • Joined 27-August 07
To be honest, I don't even have a clue where you get to see this screen in regards to WMI... :unsure:
Not trying to pretend the enemy that I am.

#3
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
1. Log in as a local administrator on the target system.

2. If possible, configure antivirus so it does not scan any of the files of subfolders of "%windir%\system32\wbem\repository".

3. Execute the following batch file to clear out the existing repository and autorecovery cache.

%systemdrive%
cd %windir%\system32\wbem
sc config winmgmt start= disabled
net stop winmgmt /y
if exist repository.old rmdir /s/q repository.old
rename repository repository.old
if exist autorecover.old rmdir /s/q autorecover.old
rename autorecover autorecover.old
md autorecover
4. Export the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM" to a REG file for backup (i.e. WBEM_org.REG). Then Import the following REG file to set the WBEM logging level to verbose, increase the maximum log size to 5 MB, and clear out the autorecovery list.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM]
"Logging"="2"
"Log File Max Size"="5000000"
"Autorecover MOFs"=hex(7):00,00
"Autorecover MOFs timestamp"=""
5. Execute the following batch file to rebuild the repository and autorecovery list. The duplicate lines are intentional. This batch file will take several minutes to complete.

%systemdrive%
cd %windir%\system32\wbem
sc config winmgmt start= auto
for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s
for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s
for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %%s
WINMGMT.EXE /REGSERVER
WINMGMT.EXE /CLEARADAP
WINMGMT.EXE /RESYNCPERF
6. Wait approx 15 minutes after running the above batch file to allow the performance counter resynchronization to complete. Then run WMIDIAG (cscript wmidiag.vbs) to establish a baseline report.


7. Execute the following batch file to clear out the WBEM logs.

%systemdrive%
cd %windir%\system32\wbem\logs
del /Q *.*

MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#4
nmX.Memnoch

nmX.Memnoch

    MSFN Master

  • Patrons
  • 2,086 posts
  • Joined 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag
Or he could download the WMI Diagnosis Utility 2.0 from the Microsoft site and run that as a local admin... ;D

It backs up and clears the repository as well. We found it when we found out that some custom stuff done to our workstations sometimes causes the repository to grow to astronomical sizes (several GB...yeah). Running WMI Diag on the workstation fixes the problem.

Edited by nmX.Memnoch, 12 December 2007 - 11:47 AM.


#5
PsiMoon314

PsiMoon314

    Junior

  • Member
  • Pip
  • 73 posts
  • Joined 09-February 04
Hi,

You could also use Dial-a-Fix to repair or reinstall WMI/WBEM services and such automatically for you.

If this doesn't fix the issue then you can download the MS repair tool and the package has the download location for you.

Kind Regards

Simon
© 2008 Simon Zerafa.

#6
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag

Or he could download the WMI Diagnosis Utility 2.0 from the Microsoft site and run that as a local admin... ;D

It backs up and clears the repository as well. We found it when we found out that some custom stuff done to our workstations sometimes causes the repository to grow to astronomical sizes (several GB...yeah). Running WMI Diag on the workstation fixes the problem.

Yeah, but if it fails, what then? It doesn't tell you where it failed (whereas the script and .reg files I gave are safer, and visible as to what is happening) ;).
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#7
nmX.Memnoch

nmX.Memnoch

    MSFN Master

  • Patrons
  • 2,086 posts
  • Joined 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

It doesn't tell you where it failed


True, true. I don't recall that we've ever had it fail...but you're right, it doesn't give you a clue at all where it failed at.

#8
RYU81

RYU81

    Member

  • Member
  • PipPip
  • 288 posts
  • Joined 02-June 04
Thanks guys is working
Images in signatures shall NOT exceed a total of 300x100 and 80kb.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users