Q:

Is there an easy way to verify that a server exists on a network with VBScript?

I have the eventual goal of determining that a particular database on a particular server with particular credentials is running, but I would settle, at this point, for the ability to check and see if a server is actually up on the network.  Does anyone have a way of doing this?  I seem to be drawing a blank.
Michael

A:

try this
Dim target
Dim result

target= "172.19.130.96"

Set shell = WScript.CreateObject("WScript.Shell")

Set shellexec = shell.Exec("ping " & target) 

result = LCase(shellexec.StdOut.ReadAll)

If InStr(result , "reply from") Then
  WScript.Echo "Server alive"  
Else
  WScript.Echo "Not Alive"
End If

There maybe better ways especialy given you end goal but this should work and at least point you in the correct direction.

