Skip to main content

batch command

Use the batch command to queue config operations without any knowledge of the scripting capabilities of the operating system that XClarity Essentials OneCLI is running on. When entering the config commands in a batch file, the XClarity Essentials OneCLI config application individually reads and runs each config command.

batch command syntax

OneCli.exe config batch --file <batchfilename> [<options>]

The format in the batch file should be:

<command1> <command1 options>
<command2> <command2 options>
<command3> <command3 options>
Note
The --output or connection option is not required for the previous command in the batch file.
Table 1. batch command specific parameters
ParameterRequired/OptionalNotes
--fileRequired
  • The file name of the batch file, which has the config commands.
  • XClarity Essentials OneCLI individually reads and runs each command.
  • --bmc, -b

  • --bmc-rest-port, -p

  • --bmc-password, -w

  • --bmc-username, -u

  • --check-trust, -C

  • --config

  • --node

  • --nolog

  • --never-check-trust, -N

  • --output, -o

Optional

Refer to Table 2.

Note
  • In batch mode, the show and set commands ignore the suppressed information. Users can see the suppressed settings current value using show, and set the suppressed settings without an error.
  • All of the commands in a batch file must target an individual system and not multiple systems. A batch file that contains commands that target multiple systems is not supported.
  • The following example batch file contains the set and show commands. All of the set commands are sent to BMC at same time, and then all of the show commands are sent.

This is an example of batchfile.txt:

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 --bmc userid:password@host