VB Script IP Online tester
This script will show which all IP address are in use for a range of IP and also check whihc all are online and whihc all are offline.
SCRIPT
=======
============================================================================================
'Script Written by Sudheesh Narayanaswamy
'This can be used to check the IP address which are in use currentely. It will tell you which all IP are online and which all are offline
'SET teh Minnum Rnage and Maximum range'Name the service which you want to check in the Varable sService (Name of service in uppercase)
'Usuage cscript <FILENAME.VBS> will output to dos and in case you want to save this cscript <FILENAME.VBS> output.log
'==============================================================================================
'Set the values to test
RangeMin = " 10.171.88.136"
RangeMax = " 10.171.88.156"
Set WshShell = CreateObject("WScript.Shell")
MinAry = Split(RangeMin, ".", -1, 1)
MaxAry = Split(RangeMax, ".", -1, 1)
times = MaxAry(3)- MinAry(3)
For i=1 To times
IPAry = Join(MinAry, ".")
PINGFlag = Not CBool(WshShell.run("ping -n 1" & IPAry ,0,True))
If PINGFlag = True Then
WScript.Echo "Online" & IPAry
Else
WScript.Echo "Ofline" & IPAry
End If
MinAry(3)=MinAry(3)+1
Next
=============================================================================
Hope this will be helpful
Sudheesh Narayanaswamy | Support Engineer
Comments
Anonymous
January 01, 2003
.. and yes... "doens't" was intentional :)Anonymous
January 01, 2003
This doesn't work on aWindows Server 2008R2 domain when run from a Win 7 (Admin) command prompt... but ping does. Any ideas? ThanksAnonymous
January 01, 2003
Not Sure It works for me in Windows 7 and Windows 2008 R2 as well ... Just need to run from Run as administartor prompt. Rather i tested this script in windows 7 PC :)Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
That'not true. It works perfectly! My typing is what doens't work :)Anonymous
February 04, 2011
how to unlock the forms in vb6.0???