Dell EMC OpenManage Essentials Version 2.5 User's Guide

About tokens

The following tokens can be used to pass values to the batch, script, or executable file:
  • $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 file. 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 field and it is ignored if the token is not in use.
  • $NAME—This 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 file 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 field.

For example, if you use $USERNAME $PASSWORD $IP $RAC_IP $NAME as arguments, a batch file 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

  • NOTE: The credentials are passed in plain text to the command line. If you schedule a task to run later, the credentials are encrypted and stored in the database. The credentials are decrypted when the task runs at the scheduled time. However, if you use the RUN option on a previously created task, enter both administrator credentials for the system and the script credentials.
Related reference


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\