it's understated to say that issues with wmi are nebulous problems. i've blogged about it a couple of times in the past, each with a potentially different solution. there are even pretty in depth posts with how to correct wmi problems. here's some links for starters:
they contain some of the more common ways of troubleshooting wmi problems. there's going to come a time when none of it works. you'll be tempted to rebuild the entire repository just to beat down the recalcitrant system. before doing so, try this method that one of my coworkers used to correct a problem issued when issuing this query:
select * from win32_networkadapter
this would kick back error # 0x80041013 - "provider load failure". (you may be more familiar with it as wbem_e_provider_load_failure) knowing that this was a problem with the win32_networkadapter class, it was tracked back to these requirements. what was believed to be the offending .dll and .mof (cimwin32.dll and cimwin32.mof) files were copied from another working system and compiled/registered. well... that didn't fix it. yeah, surprise.
wmidiag.vbs was executed against the system to see what it could locate. these are the results that came up of notable interest:
92567 15:12:33 (1) !! ERROR: WMI EXECQUERY operation errors reported: ..................................................................... 1 ERROR(S)! 92568 15:12:33 (0) ** - Root/CIMv2, Select * From Win32_NetworkAdapter WHERE AdapterType IS NOT NULL AND AdapterType != "Wide Area Network (WAN)" AND Description != "Packet Scheduler Miniport", 0x80041013 - (WBEM_E_PROVIDER_LOAD_FAILURE) COM cannot locate a provider referenced in the schema.
when i looked at the logs originally, i glossed over it and tried to execute the query in the wrong context. my coworker had a bit more diligence about it and did it right.
the real stuff to look at is where i bolded and underlined the results. to use this, execute the "select * from msft_wmiselfevent" in the namespace where the problem exists. it must be executed as an asynchronous notification query. (The namespace for win32_networkadapter is root\cimv2, for example.)
once you execute the query, leave the window open and perform the following:
switch the method invocation options to "semisynchronous".
use the "query" button and execute the problem query statement.
switch back to the window running the msft_wmiselfevent query.
hopefully you'll see where the problem occurs. in our case, the problem traced back to "brcmgroup provider" which turns out is a broadcom cim provider. once this was removed, the problem went away. good job, chris. here's a link to his post about this topic.