Automate TELNET commands using VB Script
TipsMake.com - The processing of batch work with .bat files (batch job) and recently using Windows scripts (.wsf) is the first choice of network administrators, to increase public performance The most optimal way. Using batch jobs you can automatically install and remove applications, inventory software or settings for the operating system of all computers on the network. However there are certain tasks that sometimes need to go through multiple authentication layers, such as TELNET .
TELNET (short for TErminaL NETwork ) is a network protocol that is used on connections to the Internet or connections at the local LAN computer network. The purpose of the TELNET protocol is to provide a general, bipolar media, using 8-bit width, byte orientation.
Many network administrators use TELNET for switches to query or set up ports, monitor system operation status, even restart network devices from the command line via TELNET. Therefore it is much more convenient if you can automate TELNET jobs just like batch jobs.
In fact, if you are used to using VB scripts to create Windows scripts, VB script provides a very useful feature when you set up Windows Shell scripts for objects, then release that object carefully. by time by the command. Basically, this is like you're sitting in front of a command window and typing in it. The only difference is that the Windows script will send the command window to you.
Automate TELNET Job
Basically we have two parts to do for this task. You need to sequence the commands you want through the typical TELNET session.
In this example, we have 5 devices on the network that need to boot remotely via TELNET using 4 simple commands. The first is to use an IP address and a specific port. Next a menu appears, press Enter .
Select a number corresponding to the functions in MAIN MENU , press Enter .
Now we have different methods to do this. Some people like to use TST script . But it is somewhat complicated for an inexperienced person. TCL is also a similar scripting language, used for many years. However, here we will guide you to use a VB script file to perform tasks in the shortest, simplest time.
To do this, place the following code in a file, such as AutoTELNET.wsf, and then double-click to run:
First, set up TELNET:
That is the whole process of automating TELNET, with just three easy steps in an uncomplicated script. After getting used to it, you can customize them to your needs in automating tasks to manage network switches, time clocks or remote system control via TELNET.
You should read it
- How to Use Telnet on Mac OS X
- How to Activate Telnet in Windows 7
- 10 useful commands in Windows you should know
- Instructions for activating TFTP and Telnet Client on Windows 10
- How to Send Email with Telnet
- How to use PuTTY on Cisco routers and switches
- Knowledge of TCP / IP network protocols
- Officially released TLS 1.3, promising a faster, safer Internet world
May be interested
- Run remote commands on Cisco routers from the computercan you place the cursor at the windows command prompt and run a command on the router? usually, you will first have telnet or ssh to connect to the router to be able to execute commands? this article will show you how to simultaneously run router commands without having to exit the windows command prompt, which is very convenient for control and
- How to use Power Automate on Windows 11 to automate taskspower automate desktop is a new windows 11 tool with the ability to automate many different tasks. power automate's predecessor was microsoft flows.
- 6 Tasks You Should Automate Every Month to Avoid Burnoutafter years of feeling burned out, many people have taken serious action to automate some tasks. since then, they have not felt as stressed as before.
- How to automate Photoshop with Photoshop Scriptstoday, this article will show you how to use photoshop scripts. it gives you the ability to change the behavior of a running script - something that photoshop actions can't do!
- Microsoft Power Automate is officially launched to usersmicrosoft power automate is the replacement service for microsoft flow. with process avisor, you can simplify your workflow when addressing bottlenecks by exploiting processes in power automate.
- Hands-free with 5 VB scripts that automate the use of Windows computersvb script is scaled from visual basic programs used as windows scripts can do anything from collecting important information about computer hardware to stopping and starting the service or reinstalling the card network.
- Summary of the common Run CMD commandsinstead of performing manual and direct access operations on windows, we can replace existing cmd commands for faster access.
- 999+ AI commands for learningtipsmake.com will provide full commands used in learning according to the list below.
- Managing Windows networks using Script - Part 13: The script returns all valuesin the previous article of this series we came up with a script called displayclassproperties.vbs, which shows the names of the properties of the wmi class. this is what the script content is, by using win32_bootconfiguration as a class, we are connecting to the wmi nickname.
- Use Google applications more efficiently with Google Apps Scriptwith google apps script, you can add menus, custom dialogs, write functions and macros, build add-ons for google docs, sheets and slides.