Creating a command definition

You can use command automation to run a command-line program on a managed system. A command definition can be run immediately, scheduled to run at a specific time, or scheduled to run at regular intervals.

Before you begin
Note: This task requires the IBM® Systems Director Launched Tasks program. This program is installed automatically the first time you use a task that requires it. For information about the IBM Systems Director Launched Tasks program, see "Starting the IBM Systems Director Launched Tasks program."
About this task
Note: Remember that anything a system-account user can do from a command line can be done to the system, regardless of the user who is logged in to the managed system.

To create a command definition, complete the following steps:

  1. In the IBM Systems Director Web interface navigation area, click Navigate Resources.
  2. Navigate to the resource for which you want to create a command definition.
  3. Right-click the resource and select Automation > Command Automation. The Command Automation page is displayed.
  4. Click Create.
  5. Specify information about the command-line operation:
    1. In the Command field, type the fully qualified file name and command syntax. Consider the following information:
      • For managed systems running IBM i, the command is run in the QShell environment. To run an IBM i system command (such as the call command), you can specify the command to run in the following manner:
        system 'call mylib/myclpgm'
        The command runs within the QShell environment and enables you to access the IBM i system commands.
      • For managed systems running Windows®, preface the command with the following string to ensure that it runs in a Windows command-shell window:
        cmd /c
    2. In the Timeout field, type a timeout value, in seconds. Make sure that the timeout value is long enough.
    3. Select the Log check box if the command produces text-based output, for example, a directory listing.
    4. Optional: If you want to run the process using an alternate user account and override the default user ID, you can specify a user ID and password in the Login group box.
    Note: (Managed systems running IBM i only) Commands cannot be performed using the default user ID that is shipped with IBM Systems Director. For a command definition to run successfully on IBM i systems, the command definition must specify a valid user ID and password, or the managed system to which it is being run must be configured to specify a user that has the authority to run the command definition. You can register that user in the IBM Director Agent default user function ID on the managed system using Application Administration in Power Systems® Navigator.
    Note: You either must specify an alternate user ID or remove the default user ID from the registered function and add a new default user ID that has the required authority to perform the command.
  6. Click File > Save As to save the command definition.
  7. In the Save As window, type a name.
    Note: The name for a command definition includes the following information:
    • Type of command definition that is to be run
    • Name of the command definition that is to be run
    • Types of managed systems with which the command definition will work correctly
  8. Click OK.
  9. Click File > Close to close the window.
Results
The new command definition is displayed on the Command Automation page in the IBM Systems Director Web interface.

Table of Contents