hi,
I have a list of 100 computer hostnames. How can i know whether they are
currently on the network using scripting?
thanks

Re: check availability of computers by Torgeir

Torgeir
Thu Sep 18 07:26:26 CDT 2003

Moley wrote:

> I have a list of 100 computer hostnames. How can i know whether they are
> currently on the network using scripting?

Hi

The VBScript function IsConnectible in the link below will work on all OS
versions (it uses ping.exe to ping the host to see if it is online):

http://groups.google.com/groups?selm=3EB2AA54.EBB5ECBC%40hydro.com


--
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/scriptcenter



Re: check availability of computers by Moley

Moley
Thu Sep 18 07:55:47 CDT 2003

how do i amend the script to take in 100 computer names from a .txt file?

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:3F69A472.4628EAE@hydro.com...
> Moley wrote:
>
> > I have a list of 100 computer hostnames. How can i know whether they are
> > currently on the network using scripting?
>
> Hi
>
> The VBScript function IsConnectible in the link below will work on all OS
> versions (it uses ping.exe to ping the host to see if it is online):
>
> http://groups.google.com/groups?selm=3EB2AA54.EBB5ECBC%40hydro.com
>
>
> --
> 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/scriptcenter
>
>



Re: check availability of computers by Rick

Rick
Thu Sep 18 14:20:22 CDT 2003

Open and read the file. One line, check the status, output to file, then
read the next.
Calls functions for IsValidPing, GetUser for current logged in user,
CheckService, the CheckRPCVersion. That code not included.
==============================
Set WshFS = WScript.CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")

Set File = WshFS.GetFile("H:\RemoteScripts\AllSystems.csv")
Set TextStream = File.OpenAsTextStream(ForReading)
Counter = 0
Set OutputFile =
WshFS.CreateTextFile("H:\RemoteScripts\AllSystemsHealth.csv", 1)

Do While Not TextStream.AtEndOfStream
CurrentLine = TextStream.ReadLine
System2update = Left(UCase(CurrentLine), InStr(CurrentLine,",") -1)
wscript.echo "Starting the trigger for " & System2Update

If IsValidPing(System2Update) Then

WScript.Echo System2Update & " is alive and well!"
Status = "Alive"
CurrentUser = "," & GetUser(System2Update)
NAVServiceStatus = "," & CheckService(System2Update)
RPCVersion = "," & CheckRPCVersion(System2Update)
Else

WScript.Echo System2Update & " cannot be contacted."
Status = "Not responding"
CurrentUser = ""
RPCVersion = ""
NAVServiceStatus = ""
End If


OutputFile.WriteLine CurrentLine & "," & Status & CurrentUser &
NAVServiceStatus & RPCVersion

Loop
TextStream.Close
OutputFile.Close

"Moley" <moley_cruz@yahoo.com.au> wrote in message
news:%23q8FrOefDHA.1732@TK2MSFTNGP12.phx.gbl...
> how do i amend the script to take in 100 computer names from a .txt file?
>
> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
> news:3F69A472.4628EAE@hydro.com...
> > Moley wrote:
> >
> > > I have a list of 100 computer hostnames. How can i know whether they
are
> > > currently on the network using scripting?
> >
> > Hi
> >
> > The VBScript function IsConnectible in the link below will work on all
OS
> > versions (it uses ping.exe to ping the host to see if it is online):
> >
> > http://groups.google.com/groups?selm=3EB2AA54.EBB5ECBC%40hydro.com
> >
> >
> > --
> > 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/scriptcenter
> >
> >
>
>



saving event log by Moley

Moley
Fri Sep 19 08:01:37 CDT 2003

hi,
how can i write a script to save event log of my remote systems to directory
c:\logs?
thanks



Re: saving event log by John

John
Sat Sep 20 03:45:02 CDT 2003

On Fri, 19 Sep 2003 21:01:37 +0800, "Moley" <moley_cruz@yahoo.com.au>
wrote:

>hi,
>how can i write a script to save event log of my remote systems to directory
>c:\logs?
>thanks
>

WSH 5.6 documentation (local help file) can be downloaded from here if
you
haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp