Issue:
WMI is not reporting hardware information to some applications (like Citrix EdgeSight or HP Proliant Support Pack, for example). Event Viewer will show the following error:
Windows Management Instrumentation ADAP failed to connect to namespace \\.\root\cimv2 with the following error 0x80041002
Solution:
Rebuild WMI. Create a script with following lines and run on affected server:
cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer
Run %windir%\system32\wbem\wbemtest and click Connect button. And connect to root\cimv2 namespace, to verify is working.
If still not working, run following command to reset WMI to initial state:
%windir%\system32\wbem\winmgmt /resetrepository
4 comments:
FWIW, if you built a script with your example, it won't work.. using %i within a script is invalid syntax.. you have to make your script look like the following:
cd /d %windir%\system32\wbem
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do %%i /RegServer
Otherwise it thinks the %i is a variable and the 'for' fails.
But thanks for the post, it pointed me in the right direction!
Can I run this on Windows 2008 SP1 Server?
I know this is an old post but I thought I'd share what fixed it for me. I tried many solutions like the one posted here and also deleting/recreating the wbem repository but the only thing that finally worked was the WMI repair tool by Tweaking http://majorgeeks.com/Tweaking.com_-_Repair_WMI_d7236.html
Select only WMI repair from the list of issues
Cheers!
Thanks so much for this post! While I didn't script it, I did manually run the commands. This helped us fix a problem with our Whats Up Gold service monitor that's been around for 4 months!
Post a Comment