Users Guide

You can enter tokens (substitution parameters) in the command line task to be passed to the script le, executable, command, or
batch le and execute local scripts on devices that are discovered in OpenManage Essentials.
To manage generic command line tasks:
1.
Click ManageRemote TasksCommon TasksCreate Command Line Task.
2. In the General tab, choose Generic Command.
3. If required, update the task name.
4. Enter the path and command (batch, script, or executable) to run on the local system.
5. (Optional) Enter any arguments for the command. If $USERNAME and $PASSWORD are used in Arguments, you can pass the
credentials to the command by the entering the credentials under Script Credentials. If $IP or $RAC_IP are used in
Arguments, you can run the command against the selected target(s) by passing the IP address of each target to the command.
NOTE: The tokens provided in the Arguments eld must entirely be in either uppercase or lowercase. For example,
$HOSTNAME or $hostname.
NOTE: If you are running a command that does not require any tokens or arguments, the Script Credentials section
and the Task Target tab are not displayed.
6. (Optional) Choose Ping Device if you want to ping the device rst.
7. (Optional) Choose Output to le to capture task output from multiple targets. Enter path and lename.
To log the information from all selected targets, select Append.
To write all the detected errors to the log le, select Include errors.
8. On Task Target, do one of the following:
Select a query from the drop-down list, or create a query by clicking the New button.
Select targets for running the commands.
9. On Schedule and Credentials, enter the local administrator credentials with rights to run commands on the OpenManage
Essentials system. Set schedule for the task(s) and then click Finish.
Related links
About tokens
Generic Command
About tokens
The following tokens can be used to pass values to the batch, script, or executable le:
$IP and $RAC_IP—If these arguments are used, the Task Target tab is displayed in the Create a Command Link Task screen.
The Task Target tab allows you to select the targets to pass the arguments. $IP is used for a server IP and $RAC_IP is used for a
RAC (iDRAC) IP. From the Task Target tab, you can select either groups, a device or use dynamic queries.
$USERNAME and $PASSWORD—In some instances, you must provide credentials for a remote system in your batch or script
le. If $USERNAME or $PASSWORD are used in arguments, the Script Credentials section is displayed for these values. The
credentials entered in the Script Credentials section are passed to the command line. You can pass either of these values or
both.
NOTE: You must enter both values in the Script Credentials section. If you do not need to use one value, enter any
text in the eld and it is ignored if the token is not in use.
$NAMEThis token passes the name of the system found in the OpenManage Essentials Device Tree. The name is most often
the host name of the system, but in some instances it might be either an IP address or a string such as Dell Rack System
– SVCTAG1.
Passing tokens to a script
If you are using a batch le or a script, use %1, %2, %3 , and so on, to receive the values passed from OpenManage Essentials. The
values are passed in the order they are entered from left to right in the Arguments eld.
For example, if you use $USERNAME $PASSWORD $IP $RAC_IP $NAME as arguments, a batch le with the following Echo
%1 %2 %3 %4 %5 displays the following result:
C:\Windows\system32>echo scriptuser scriptpw 10.36.1.180 10.35.155.111 M60505-W2K8x64
scriptuser scriptpw 10.36.1.180 10.35.155.111 M60505-W2K8x64
305