How to fix a WMIDiag error

I am having a WMI issue with one workstation and after running WMIDiag several times I have been able to cleanup all but two remaining errors. I ran WMIDiag with the CheckConsistancy parameter that was supposed to "fix" any errors (thanks SP2) but it did not correct much of anything, I had to smack it with a hammer numerous times.  The remaining two errors are listed below in the snippet section.  I have no clue how to correct them.  I am looking for very specific steps to resolve this issue.
Thanks in advance
38401 20:08:11 (1) !! ERROR: WMI EXECQUERY operation errors reported: ..................................................................... 2 ERROR(S)!
38402 20:08:11 (0) ** - root/ccm/Policy/machine, 'Select * From CCM_PolicyAgent_Configuration' did not return any instance while AT LEAST 1 instance is expected.
38403 20:08:11 (0) ** - root/ccm, 'Select * From SMS_Authority' did not return any instance while AT LEAST 1 instance is expected.
38404 20:08:11 (0) **

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Run CCMCLEAN and remove the SMS agent cleanly.  Check the logs to ensure it is, in fact, cleanly removed.
Reinstall the SMS client (if you need it) or deploy it again from the SMS Site Server to that machine.

conlinAuthor Commented:
Thanks Netman66
Running CCMClean seems to have fixed WMI as WMIDiag now claims that WMI is working properly.  Unfortunately I now have a couple of new issues that I'm not sure how important they are.  This is definitely "not" my area of expertise.  Would you review the WMIDiag report attached and let me know what you think.
I certainly appreciate your assistance.
Stick this in a CMD file somewhere on that server:

cd \windows\system32\wbem
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s

Stop the WMI Service in Services.msc.

Run the script from an open CMD window so you can see any errors.  Alternately, you can pipe the output to a file like so:

fixwmi.cmd > c:\fixwmi.txt

(this assumes you saved your file as fixwmi.cmd).

Let me know.

The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

Oh, I forgot to tell you to restart WMI service - or restart the server completely.

You can run another WMIdiag if you like.

conlinAuthor Commented:
It doesn't run.  The error I receive is "The syntax of the command is incorrect.". I tried moving the fix file directly into the c:\windows\system32\wbem directory and running with and without the output redirected to a file.  I noticed that you mentioned server more than once. This is a Win XP Pro SP2 workstaiton.  Could that be the issue?  I did stop the WMI service.

Thanks again for your assistance
Sorry about that!  I read right past the fact it was a workstation.

Try this:

cd \windows\system32\wbem
for /f %%s in ('dir /b *.mof *.mfl') do mofcomp %s

If that fails then you can completely rebuild WMI by stopping the services and deleting the Repository contents.  Beware that any software installed that adds MOFs to WMI will probably need to be reinstalled if they stop working.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
conlinAuthor Commented:
I solved the problem working with the software vendor that was collecting the WMI information and relocated it to the local subnet. That solved the immediate issue.
With the suggestion that the last recommended fix might require a reistall of various software and I resolved my immediate WMI issue, I chose not to execute the recommended process and let things remain as they are. It simply was not worth my time to reinstall untold numbers of software that might deposit MOF's to WMI. Thanks to Netman66 for sticking with me and I am sorry for the time lag for this answer. I didn't seen that his last fix had been posted.  So lets give him some points even though I decided not to pursue his last suggestion.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Utilities

From novice to tech pro — start learning today.