Use the batch command to queue config operations without any knowledge of the scripting capabilities of the operating system on which ToolsCenter Suite CLI is running. When you enter the config commands in a batch file, the ToolsCenter Suite CLI config application individually reads and executes each config command.
batch command syntax
OneCli.exe config batch --file <batchfilename>[--output<folder>][connection option]
<command1> <command1 options> <command2> <command2 options> <command3> <command3 options>The --output or connection option is not required for the command in the batch file as shown above.
Parameter | Required/Optional | Notes |
---|---|---|
--file | Required |
|
--output | Optional | By default, the log file output is saved to: ../Onecli-%PID%-%date%-%time%/. |
connection options | Optional |
|
set IMM.Community_AccessType.1 Get set IMM.Duplex1 Auto set IMM.MTU1 1500 set IMM.SNMPv1Agent Enabled set IMM.SNMPv3Agent Disabled show IMM.SNMPv3Agent set IMM.SNMPv3Agent Enabled show IMM.SNMPv3Agent
Example of the batch command
OneCli.exe config batch --file batchfile.txt --imm USERID: PASSW0RD@10.240.252.102This is the output generated from this example:
Lenovo ToolsCenterSuite CLI tcliXXX-X.X.X
Based on module version X.X.X
Licensed Materials - Property of Lenovo
(C) Copyright Lenovo Corp. 2013-2016 All Rights Reserved
Invoking SHOW command ...
Connected to IMM by IP address 10.240.252.102
Batch mode start.
[set IMM.Community_AccessType.1 Get]
IMM.Community_AccessType.1=Get
[set IMM.Duplex1 Auto]
IMM.Duplex1=Auto
[set IMM.MTU1 1500]
IMM.MTU1=1500
[set IMM.SNMPv1Agent Enabled]
IMM.SNMPv1Agent=Enabled
[set IMM.SNMPv3Agent Disabled]
IMM.SNMPv3Agent=Disabled
Beginning intermediate batch update.
Waiting for command completion status.
Command completed successfully.
Completed intermediate batch update.
[show IMM.SNMPv3Agent]
IMM.SNMPv3Agent=Disabled
[set IMM.SNMPv3Agent Enabled]
IMM.SNMPv3Agent=Enabled
Beginning intermediate batch update.
Waiting for command completion status.
Command completed successfully.
Completed intermediate batch update.
[show IMM.SNMPv3Agent]
IMM.SNMPv3Agent=Enabled
Batch mode completed successfully.