ElMoez
Jan 12th, 2006, 04:41 AM
hello
I'm writing a script which use telnet to monitor a switch
this is my script
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "telnet.exe" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "open ipAdress"& chr(13)
WScript.Sleep 5000
WshShell.SendKeys "admin" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "pass" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "systat" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "Logout" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "quit" & chr(13) & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "exit"& chr(13)
WScript.Quit
when i use systat the switch return a statistics about it
i want to return this result to a text file in my computer
how can i do it
some one can help me ?
thx
I'm writing a script which use telnet to monitor a switch
this is my script
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "telnet.exe" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "open ipAdress"& chr(13)
WScript.Sleep 5000
WshShell.SendKeys "admin" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "pass" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "systat" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "Logout" & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "quit" & chr(13) & chr(13)
WScript.Sleep 5000
WshShell.SendKeys "exit"& chr(13)
WScript.Quit
when i use systat the switch return a statistics about it
i want to return this result to a text file in my computer
how can i do it
some one can help me ?
thx