The CA Workload Automation DE CLI allows user to perform several tasks. Executing one command at a time takes very long. Even if one session is kept open, the user has to type or 'copy and paste' one entry at a time. This can be error prone and can take hours if there are several hundred such commands that need to be entered.
When using the CLI from a command line, the user can enter several commands in the same session. The CLI can be used in a script that will allow quick processing of several commands. Here is an example script for the cli (e.g. save it as my_cli.sh), with predefined input values to login to the CA WA DE server. User may modify it to suit their environment and OS
#Define path to cli, hostname, port, user, and password
#use ENCRYPTPASSWORD command to encrypt the password
$CLI $HOST $PORT $USER $PASS
Next create a file with commands that need to be defined, such executing an event or listing an application. Run 'help' from cli to get all the possible commands.
Here is a sample text file with a few commands (e.g. save it as cli_commands.txt).
Note: Commands are not case-sensitive.
Run this from the command prompt
All the commands from text file (cli_commands.txt) will get executed in the same session. This allows quicker execution.