Discussion:
WMI error
(too old to reply)
Tom K
2008-03-18 13:52:05 UTC
Permalink
This line in our logon script...
Set oWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
...returns an error code 80041002 on some systems.
Anyone have ideas what might be causing it?
Thanks,
Tom
Are these WinNT systems? That error is WBEM_E_NOT_FOUND according to
a search at MSDN. IIRC, NT does not have WMI installed, though it can
run it.
If they are not NT, then the problem must presumably be related to a
fault in the WMI installation.
In any case, it would appear to be a configuration problem, not a
scripting fault. You may get more help at the WMI or a sys admin
group.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
Thanks for the quick reply, Tom. These are all fully patched Windows XP SP2
systems that are displaying the problem. I forgot to include the WMI group
on my OP so I've added them now. Hopefully those wizards will have
something for me.

The $65,000 question is what is the quickest and easiest way to rebuild the
WMI installation?

Tom
TDM
2008-03-18 14:20:11 UTC
Permalink
Post by Tom K
This line in our logon script...
Set oWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
...returns an error code 80041002 on some systems.
Anyone have ideas what might be causing it?
Thanks,
Tom
Are these WinNT systems? That error is WBEM_E_NOT_FOUND according to
a search at MSDN. IIRC, NT does not have WMI installed, though it can
run it.
If they are not NT, then the problem must presumably be related to a
fault in the WMI installation.
In any case, it would appear to be a configuration problem, not a
scripting fault. You may get more help at the WMI or a sys admin
group.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
Thanks for the quick reply, Tom. These are all fully patched Windows XP
SP2 systems that are displaying the problem. I forgot to include the WMI
group on my OP so I've added them now. Hopefully those wizards will have
something for me.
The $65,000 question is what is the quickest and easiest way to rebuild
the WMI installation?
Tom
When WMI is busted, and the answer is not obvious,
this is the first place I turn. It has helped me many times.
This tool is also the biggest VB Script I have ever seen.

Watch for line wrap.

http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=en


TDM
Richard Mueller [MVP]
2008-03-18 15:42:07 UTC
Permalink
Post by TDM
Post by Tom K
This line in our logon script...
Set oWMIService =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
...returns an error code 80041002 on some systems.
Anyone have ideas what might be causing it?
Thanks,
Tom
Are these WinNT systems? That error is WBEM_E_NOT_FOUND according to
a search at MSDN. IIRC, NT does not have WMI installed, though it can
run it.
If they are not NT, then the problem must presumably be related to a
fault in the WMI installation.
In any case, it would appear to be a configuration problem, not a
scripting fault. You may get more help at the WMI or a sys admin
group.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
Thanks for the quick reply, Tom. These are all fully patched Windows XP
SP2 systems that are displaying the problem. I forgot to include the WMI
group on my OP so I've added them now. Hopefully those wizards will have
something for me.
The $65,000 question is what is the quickest and easiest way to rebuild
the WMI installation?
Tom
When WMI is busted, and the answer is not obvious,
this is the first place I turn. It has helped me many times.
This tool is also the biggest VB Script I have ever seen.
Watch for line wrap.
http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=en
TDM
After research I found the following regarding connecting to remote
computers with WMI:

1. You cannot connect to computer running XP Home.
2. An NT computer cannot connect to OS later than W2k.
3. A W2k3 computer cannot connect to Win9x.
4. To connect to W2k Server SP4 you must set impersonation level to
Impersonate.
5. W2k computers must have SP2 to connect to XP or above.
6. W2k3 can only connect to Win9x and NT if credentials supplied.
7. To connect to XP or W2k3 you must set authentication level to Pkt.

For best results in all situations, I use:

strComputer = "pc_name"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _
& strComputer & "\root\cimv2")

This KB article on troubleshooting WMI is very useful:

http://support.microsoft.com/kb/875605#3

I have also used this link:

http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
TDM
2008-03-19 03:01:11 UTC
Permalink
Post by Richard Mueller [MVP]
After research I found the following regarding connecting to remote
1. You cannot connect to computer running XP Home.
2. An NT computer cannot connect to OS later than W2k.
3. A W2k3 computer cannot connect to Win9x.
4. To connect to W2k Server SP4 you must set impersonation level to
Impersonate.
5. W2k computers must have SP2 to connect to XP or above.
6. W2k3 can only connect to Win9x and NT if credentials supplied.
7. To connect to XP or W2k3 you must set authentication level to Pkt.
strComputer = "pc_name"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _
& strComputer & "\root\cimv2")
http://support.microsoft.com/kb/875605#3
http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
And lest we not forget, the Windows
Firewall will not let WMI through either.

TDM

Loading...