Many administrators complain that their work is too heavy and many settings require repetitive configuration. So is there any good way to automatically complete the settings? Now we will introduce the Batch Telnet settings, so this Batch Telnet can complete our Batch processing process. 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.