Yeah, I already did that. If I take out "On Err..." it just stops at the first 
one that isn't pingable. No worries, I got it worked out a different way.
 
Thanks!

________________________________

From: [EMAIL PROTECTED] on behalf of Timo Ed
Sent: Thu 5/25/2006 4:23 PM
To: [email protected]
Subject: Re: [ActiveDir] OT help with VBS/WMI Script



I suspect line2: Set colSettings = "", just turn off 'error resume'
and you'll see whats breaking.

On 5/26/06, Hutchins, Mike <[EMAIL PROTECTED]> wrote:
> If I use this, everything gets "Server1++" nothing ever gets anywhere.
> :-)
>

>
> '=========================================
> For Each strComputer In serverList
>       Set colSettings = ""
>       Set objWMIService = GetObject("winmgmts:" _
>       & "{impersonationLevel=impersonate}!\\" & strComputer &
> "\root\cimv2")
>      Set colSettings = objWMIService.ExecQuery _
>       ("Select * from Win32_OperatingSystem")
>
>     If err then
>          WScript.Echo strComputer + "++"
>     else
>         Set colSettings = objWMIService.ExecQuery _
>        ("Select * from Win32_OperatingSystem")
>        For Each OS In colSettings'
>           WScript.Echo strComputer + "+" + OS.Caption + "+" +
> OS.Version
>        Next
>     end if
> Next
> '=========================================
>
> Rgds,
> Tim
>
>
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ml/threads.aspx



<<winmail.dat>>

Reply via email to