![]() It works excellent on the DS32B Brocade switches, but I'm having a problem when running it against the DS16B switches. Unfortunately the homepage and email address no longer exist, but here is a good place to download it: Telnet Scripting Tool (TST10) by Albert Yale is exactly what I needed. I found this thread that lead me to a great utility: I cannot install an application, as this will be run on different windows machines everytime (new sites). I have a current need for a way to automate login and commands to fiber switches (Brocade, McData) from a DOS batch file, and save the output to a text file. Shell.AppActivate telnet_session01.Lester289 lester289 Not the answer you're looking for? Browse other questions tagged shellshell-scripttelnet or ask your own question. Set telnet_session01 = Shell.Exec("""C:\Program Files\Winodws\telnet.exe"" HOST_NAME") Set Network = WScript.CreateObject("WScript.Network") Set Shell = WScript.CreateObject("WScript.Shell") When I activate the window, I start it like this: Dim Shell, Network (Found your post looking for a way to move/resize the window, but I thought I'd share anyway :) My situation requires multiple TELNET windows open simultaneously. I can then reference the specific window using that TELNET session ID and capture the focus, so when I use SendKeys to input commands it inputs them to the correct window (most of the time). I found a way to collect the PID of each TELNET window I open using ProcessID. SendKeys.vbs: set OBJECT=WScript.CreateObject("WScript.Shell") If i push the enter key(or any key) after the telnet session disconnects, the script moves on to the next iteration, but I can't seem to get the script to send that keystroke automatically. ![]() As of right now, the script performs beautifully execpt for one minor error, i cannot get the telnet session to return to the command prompt for the next iteration. It then checks the logfile for a certain string, and if the string is contained it outputs "it's a UPS!" and "Not a UPS" if the string is not contained. I'm writing a script that loops through a large list of IP addresses, telnets each one, sends login info, then sends the commands to quit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |