PC Review Forums Newsgroups Windows XP Windows XP WMI WMI GetObject Failing to return anything

Reply

WMI GetObject Failing to return anything

 
Thread Tools Rate Thread
Old 27-08-2004, 09:57 PM   #1
Charles Palmer
Guest
 
Posts: n/a
Default WMI GetObject Failing to return anything


I am working on a script that will run against all machines in a domain and
return some data about each machine through a WMI call. On about 10% of my
machines, I am not getting any return. I have the script ping each machine
first to make sure it returns as alive before I attempt a WMI call to the
machine. When I make the WMI call to the machine to get OS version and some
other data, if I don't have On Error Resume Next, the script fails with
GetObject failed. If I run the script with On Error Resume Next, after about
5 minutes, the WMI call fails and the script moves on to the next computer
in the list. The problem is, it doesn't run any of my logging or debugging
code after this point until on the next machine. I can't even return the
error message that is generated by GetObject. From trying to manually
connect to the machine through other methods, I know that the problem for
why the GetObject is failing is with the machine and I am trying to figure
out what the problem is, but this question is because it won't even log that
it has a failure when trying to connect to WMI. I am running this script
against about 500 machines and only pulling WMI on about 250 of them. Of
those 250, I have about 25 that are failing. Since it is taking between 3-5
minutes for each machine to fail, it is significantly increasing my script
runtime.

Any help or guidance that helps me figure out the problem or at least log
the problem machines would be greatly appreciated.

Thanks,
Charles Palmer


  Reply With Quote
Old 03-09-2004, 12:59 AM   #2
Marty List
Guest
 
Posts: n/a
Default Re: WMI GetObject Failing to return anything


"Charles Palmer" <charles@ggi.cc> wrote in message
news:ObzdSDIjEHA.3928@TK2MSFTNGP11.phx.gbl...
> I am working on a script that will run against all machines in a domain

and
> return some data about each machine through a WMI call. On about 10% of my
> machines, I am not getting any return. I have the script ping each machine
> first to make sure it returns as alive before I attempt a WMI call to the
> machine. When I make the WMI call to the machine to get OS version and

some
> other data, if I don't have On Error Resume Next, the script fails with
> GetObject failed. If I run the script with On Error Resume Next, after

about
> 5 minutes, the WMI call fails and the script moves on to the next computer
> in the list. The problem is, it doesn't run any of my logging or debugging
> code after this point until on the next machine. I can't even return the
> error message that is generated by GetObject. From trying to manually
> connect to the machine through other methods, I know that the problem for
> why the GetObject is failing is with the machine and I am trying to figure
> out what the problem is, but this question is because it won't even log

that
> it has a failure when trying to connect to WMI. I am running this script
> against about 500 machines and only pulling WMI on about 250 of them. Of
> those 250, I have about 25 that are failing. Since it is taking between

3-5
> minutes for each machine to fail, it is significantly increasing my script
> runtime.
>
> Any help or guidance that helps me figure out the problem or at least log
> the problem machines would be greatly appreciated.
>
> Thanks,
> Charles Palmer
>



Without seeing your script, I'm going to guess the problem is on line 62.



  Reply With Quote
Old 04-09-2004, 07:22 PM   #3
Charles Palmer
Guest
 
Posts: n/a
Default Re: WMI GetObject Failing to return anything

Despite the wise comment, I found the problem to be false returns from name
resolutions. Systems that were unavailable, when pinged by name, returned
the IP address of a machine of a different name that was active. When trying
to establish a connection to the machine with the wrong machine name, it
gave an access denied and would just fail without any error. I still don't
know why my error handling wasn't able to report the problem, but I have
fixed the problem.

Thanks,
Charles

"Marty List" <bill.gates@sun.com> wrote in message
news:2ppu02Fo05b6U1@uni-berlin.de...
>
> "Charles Palmer" <charles@ggi.cc> wrote in message
> news:ObzdSDIjEHA.3928@TK2MSFTNGP11.phx.gbl...
> > I am working on a script that will run against all machines in a domain

> and
> > return some data about each machine through a WMI call. On about 10% of

my
> > machines, I am not getting any return. I have the script ping each

machine
> > first to make sure it returns as alive before I attempt a WMI call to

the
> > machine. When I make the WMI call to the machine to get OS version and

> some
> > other data, if I don't have On Error Resume Next, the script fails with
> > GetObject failed. If I run the script with On Error Resume Next, after

> about
> > 5 minutes, the WMI call fails and the script moves on to the next

computer
> > in the list. The problem is, it doesn't run any of my logging or

debugging
> > code after this point until on the next machine. I can't even return the
> > error message that is generated by GetObject. From trying to manually
> > connect to the machine through other methods, I know that the problem

for
> > why the GetObject is failing is with the machine and I am trying to

figure
> > out what the problem is, but this question is because it won't even log

> that
> > it has a failure when trying to connect to WMI. I am running this script
> > against about 500 machines and only pulling WMI on about 250 of them. Of
> > those 250, I have about 25 that are failing. Since it is taking between

> 3-5
> > minutes for each machine to fail, it is significantly increasing my

script
> > runtime.
> >
> > Any help or guidance that helps me figure out the problem or at least

log
> > the problem machines would be greatly appreciated.
> >
> > Thanks,
> > Charles Palmer
> >

>
>
> Without seeing your script, I'm going to guess the problem is on line 62.
>
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off