I am sure during your Operations Manager career you already faced some WMI errors while installing e.g. Active Directory or XenApp management packs. A few days ago I installed the XenApp 6.0 MP in SCOM 2007 R2. Suddenly errors 0x80041001 and 0x80041002 appeared in Active Alerts view.
WMI errors are always kind of pain in the neck because there are many ways to solve the issue e.g. lack of permissions, missing hotfixes or even instable WMI repository. Here is a good starting point.
In my case I just want to show you how I fixed these errors. First make sure your WMI service is up and running!
On the server where the errors came from login as an administrator and run the following command (in an elevated command shell!)
Check the result it is likely to return “WMI repository is INCONSISTENT”
Run in a command shell
“wbemtest” / Connect…
If you also receive an error then your WMI is likely to be corrupted because you cannot connect to the default WMI namespace.
If you want to fix this problem run
if you want to reset the entire repository as it was on the first day the OS was installed run
Now you could ran the tests above again and you should receive a consistent functioning repository.
BUT BE CAREFULL! If you had some additional software installed which add namespaces like e.g. Citrix then these will be gone!
Install WMI namespace
Open an elevated command prompt or just use the one which you run the tests above and change into the directory in my case
cd c:\Program Files(x86)\Citrix\System32\Citrix\WMI
if you cannot find this directory check
cd c:\Program Files\Citrix\System32\Citrix\WMI
for %i in (*.mof, *.mfl) do Mofcomp %i
This will add the WMI classes to the repository and you will be able to access the Citrix namespace successfully.
If you want to verify the Citrix namespace run in an elevated command prompt
wbemtest / Connect…
If you don’t enter credentials it will use your current account credentials. But if you want to check if your action account as access to the Citrix namespace enter the action account credentials and click Connect…
After you successfully connected to your WMI click Query…
Type the query which appeared on the alert ‘SELECT * FROM MetaFrame_Server_LoadLevel WHEREServerNmae=”Server1″‘ does work
You should receive the result of the query without any errors.