For administrators, how can they deal with heavy and troublesome repetitive work? Here we will introduce the batch processing of Telnet. So how should we operate Batch Telnet? We found that VBscript can be used in windows to complete this job.
The following solutions:
First, we create a script named tel. vbs. Here is an example, which can be modified.
'Create Shell object
Set sh = WScript. CreateObject ("WScript. Shell ")
WScript. Sleep 1000
'Send the commands we input to telnet
Sh. SendKeys "open 192.168.1.1"
WScript. Sleep 1000
Sh. SendKeys "{ENTER }"
WScript. Sleep 1000
Sh. SendKeys "password {ENTER }"
WScript. Sleep 1000
Sh. SendKeys "en {ENTER }"
WScript. Sleep 1000
Sh. SendKeys "passord {ENTER }"
WScript. Sleep 1000
'Run the command
Sh. SendKeys "ls {ENTER }"
Then, create a batch. bat batch file:
Rem start telnet
Start telnet.exe
Rem batch telnet
Cscript // nologo tel. vbs
Finally, you only need to run batch. bat to easily create Batch Telnet. I believe that Telnet can be easily solved.