Re: WMI Ping help
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 04/29/04
- Previous message: Torgeir Bakken \(MVP\): "Re: WMI Security Access"
- In reply to: Jonathan Swift: "WMI Ping help"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 22:51:32 +0200
Jonathan Swift wrote:
> Seen this:
>
> strMachines = "atl-dc-01;atl-win2k-01;atl-nt4-01;atl-dc-02"
> aMachines = split(strMachines, ";")
> For Each machine in aMachines
> Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}")._
> ExecQuery("select * from Win32_PingStatus where address = '"_
> & machine & "'")
> For Each objStatus in objPing
> If IsNull(objStatus.StatusCode) or objStatus.StatusCode<>0 Then
> WScript.Echo("machine " & machine & " is not reachable")
> End If
> Next
> Next
>
> on Microsoft's web site.
>
> But it says only available on 2003 and XP - what would I need to do to make
> this work on 2000 ?
Hi
You could ping the computers first using ping.exe, take a look at
the IsConnectible function in the link below.
http://groups.google.com/groups?selm=ejucKB3FEHA.744%40TK2MSFTNGP09.phx.gbl
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/community/scriptcenter/default.mspx
- Previous message: Torgeir Bakken \(MVP\): "Re: WMI Security Access"
- In reply to: Jonathan Swift: "WMI Ping help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|