After you create a CMDTask file and the task is displayed on the IBM Director Console under the External Application Launch task, you can start the task in the same ways as you start any other IBM Director task.
For targeted tasks, drag the task onto a managed system. For non-targeted tasks, double-click on the task or open it with a right mouse click. When you start the task, the IBM Director Console launches the program specified on the appropriate “CommandString” line in the CMDTask file. However, if the task is targeted, several special environment variables can be set before the program is launched – this allows the targeting information to be passed to the program.
Special environment variables:
Variable Name | Description |
CMDTASK_IP_ADDRESSi | This variable retrieves the IP Address of the targeted system. Because a targeted system could have multiple IP addresses, the i should be replaced with 0, 1, 2, … beginning with zero as the first adapter for the targeted system. Example: CMDTASK_IP_ADDRESS0 |
CMDTASK_MAC_ADDRESSi | This variable retrieves the MAC Address of the targeted system. Because a targeted system could have multiple MAC addresses, the i should be replaced with 0, 1, 2, … starting with zero as the first adapter for the targeted system. Example: CMDTASK_MAC_ADDRESS0 |
CMDTASK_COMPUTERNAME | The NetBIOS name for the targeted system. |