Qualys Cloud Agent Configuration

The procedure to create a shell script to configure the Qualys Cloud Agent is as follows:

  1. In Microsoft Intune admin center, click Devices > macOS > Shell scripts > Add.

    In the Basics section, enter the following details:

    Name: Enter a name for the shell script.

    Description: Enter a description for the shell script. This setting is optional but recommended.

    Click Next.
  2. In Script settings, enter the following details:

    - Upload script: Browse to the shell script. Following is the sample script. Use valid Customer ID and Activation ID.

    #!/bin/sh
    if  [[ -f /usr/local/qualys/cloud-agent/bin/qualys-cloud-agent.sh ]]; then /usr/local/qualys/cloud-agent/bin/qualys-cloud-agent.sh ActivationId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx CustomerId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; else /Applications/QualysCloudAgent.app/Contents/MacOS/qualys-cloud-agent.sh ActivationId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx CustomerId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; fi 


    - Run the script as a signed-in user: Choose No to run the script as the root user. 

    - Hide script notifications on devices: Choose Not configured to hide script notifications on devices. 

    - Script frequency: Choose Not configured to run a script only once. 

    - Max number of times to retry if the script fails: Select how many times the script should run if it returns a non-zero exit code (zero meaning success). Choose Not configured to not retry when a script fails.

    - Click Next.

    Note: The values selected for the above fields are the default values. If any field does not contain these values, set that field value to default.

  3. Click Assignments > Include Groups. The screen shows the list of available groups.
  4. Select the groups for which you want to deploy the script and click Select.
  5. On Review + add page, review the configured settings. Click Add to deploy the shell scripts to selected groups.
shell-script-settings.png

The newly created script appears in the list of scripts.

You can monitor the run status of all assigned scripts for devices by navigating to:

ScriptsSelect the script to monitor > Device status.

The Overview page displays that shell script is successfully executed.

script_execution.png