Alternate Installation Methods - Command Line Install

Table of Contents

Overview

Updates can be remotely installed using the command line interface.

Command line installs are useful in the following scenarios.

  • Remote installation of updates can be performed simultaneously on multiple clients.
  • You can reuse the scripts to perform the remote installation of updates on the additional clients. This is made possible by modifying the client names in the script.
  • If the installation fails due to the modified security settings on the client, update the script file with the latest security settings and restart the installation of updates.

Generate Command Line Script to Remotely Install Updates on a Client

In order to perform the remote installation of updates from the command line, you need to select the required options from the CommCell Console and save it as a script (xml) file. This script can be modified as required, and then executed from the command line interface using the qoperation execute command.

  1. Right-click the <CommServe> node in the CommCell Browser, and then point to All Tasks | Add/Remove Software.

    Click Install Updates.

  2. In the Install Updates Options dialog box, expand the Client Computers node and then select the clients to install updates.

    Select the required check boxes, and then click OK.

    Click Save As Script.

  3. In the Path box, specify the location where you want to save the file and enter the file name with the .bat extension. See the example below.

    C:\install_Updates\Updates_script.bat

    The script will be saved as an .xml file, and a .bat file is created under the specified location.

    If a file with the same name already exists in the specified location, the .xml file will be created with a time stamp. However, the .bat file will overwrite the existing file.

    • By default, the user account that you use to login to the CommCell Console is used for performing the installation of the software updates. However, if the user account does not have sufficient privileges, then click Use a different account.
      • In the User Name box, type the account name that has privileges to install the software updates.
      • In the Password box, type the password for the specified account.
      • In the Confirm Password box, retype the password.

      Alternatively, you can click Browse to navigate to the location where you want to save the file.

    • Click OK.
    • Click OK on the confirmation dialog box.

Remotely Install Updates from the Command Line

Follow these steps to remotely install the updates from the command line.

  1. Execute the saved .xml script using qoperation execute command.

    qoperation execute -af install_Updates.xml

  2. To override the client name specified in the .xml file or to install the same updates to multiple clients, run the following command:

    <batch_file> -UpdateOption/clientAndClientGroups/clientName <client_name>

    For Example:

    <batch_file> -UpdateOption/ClientGroup1/client1 client2

  1. Verify the status of the job using the following command:

    qlist job −j jobID

For a detailed description of the parameters, see the following table.

Parameter Description of Parameter Values
clientGroupName Optional

This is the name of the client group to which the client is associated to. (e.g., client_group1)

clientName under

<clientGroupName> node

Short name of the client computer that is associated to a client computer group.
clientName under <clientAndClientGroups> node Short name of the client computer.
ignoreRunningJobs Ignores the jobs that are running and installs the updates when the value is set to true.

Valid values are true/false.

Default Value is false.

rebootClient Option to reboot the client after Installing the updates.

Valid values are true/false.

Default value is false.

enableTotalRunningTime Used to enable the option for specifying the maximum elapsed time since the job is created.
TotalRunningTime Option to specify the maximum elapsed time (in hours and minutes) since the job is created.

When the specified maximum elapsed time is reached, the job continues to run till it is in the "Running" state.

When the specified maximum elapsed time is reached, the Job Manager kills the job if it is not in the "Running" state.

startInSuspendedState Option to specify the job to start in the Job Controller in a suspended state; and the job cannot run until it is manually resumed using the Resume option.

Valid values are true/false.

enableNumberOfRetries To enable the option for specifying the number of times the Job Manager must attempt to restart the job.
numberOfRetries Option to specify the number of times the Job Manager must attempt to restart the job.
killRunningJobWhenTotalRunningTimeExpires Option to kill the job when the specified Total Running Time has elapsed, even if the job is in the "Running" state. This option is available only if you have specified a value for Total Running Time.