You can make a script using either of the following methods:
Making a script online: Run the batch-cmd begin command to start batch online editing of commands to save them as a script. After entering the commands, press Ctrl+C to exit the editing mode. If you run this command again, the edited commands will be cleared.
A script made online is saved in the memory of the Commander. If the Commander restarts, all the commands edited online are cleared.
Command execution results are saved in the memory of clients. If the script contains commands used to clear the client memory, such as the reboot command, you cannot run the display easy-operation batch-cmd result command to check the command execution result after the commands are delivered to clients.
Before implementing a batch configuration using the Commander, complete the following tasks:
Ensure that clients operate properly.
To enhance security for communication between the Commander and clients and prevent a bogus Commander from controlling clients, run the easy-operation shared-key command in the system views of the Commander and clients to configure the same shared key.
Run system-view
The system view is displayed.
Run easy-operation
The Easy-Operation view is displayed.
Perform either of the following steps based on the group type:
Configure a matching rule for a built-in group.
Run group build-in device-type
A built-in group is created and the group view is displayed.
Run group custom { mac-address | esn | ip-address | model | device-type} group-name
A customized group is created and the group view is displayed.
Run match { mac-address mac-address [ mac-mask | mac-mask-length ] | esn esn | ip-address ip-address [ ip-mask | ip-mask-length ] | model model | device-type device-type }
A matching rule is defined for the customized group.
Make a script online.
Run system-view
The system view is displayed.
Run easy-operation
The Easy-Operation view is displayed.
Run batch-cmd begin
The batch command editing mode is started.
If no operation is performed in the batch command editing mode within 30 seconds, the system automatically exits from the editing mode displays the Easy-Operation view. The complied commands are saved in the script.
Edit commands in the script.
The maximum length of a command (including the incomplete command) to be entered is 510 characters. If the command contains more than 510 characters, it cannot be saved in the script.
A script can contain a maximum of 200 commands.
After you enter a command, press Enter to confirm the input. Then, you cannot modify the inputted command.
Press Ctrl+C to exit the batch command editing mode.
Make a script offline.
To make a script offline, add commands to be executed to a batch processing file one by one. The batch processing file can be edited in .txt format. Save it in the *.txt or *.bat format and upload the script file to the root directory of the Commander.
Commands are delivered to a specified client.
Commands are delivered to all clients.
Commands are delivered to a specified group.
Commands are delivered to all groups.
If script-file is not specified, the Commander delivers a script made online. If script-file is specified, the Commander delivers a specific script made offline.