Scripts in Qntrl | Qntrl | Bridge | Online Help | Larger script execution made easy in Qntrl

Scripts


Early Access  

Scripts module is not enabled for all users. If you’d like to try it out, please email our support team for early access.

Scripts module helps to simplify message execution for larger scripts. While simple commands can be executed directly in the Message module, complex larger scripts that involve a series of tasks or multiple commands can be saved as a script file in this module. The saved scripts can be executed in the specified machine by passing the script name in the JSON request of the message.

Create a Script   

To create a new script:

  1. Click the settings gear iconat the left pane.

  2. Navigate to Advanced >> Bridge >> choose Scripts.

  3. Click the New Script button.

  4. Feed in the required New Script details.

    1. Name: Give a name with a file extension to identify the script (Ex: display.sh/display.ps1).

    2. Description: Provide a description that serves for later reference.

    3. Script Type: Choose the type of script. 

      1. Shell ScriptFor UNIX OS

      2. PowerShell Script For Windows OS

    4. Script File: If the script is available in a local file you may attach it in this field, and it will be executed in the message.

    5. ContentAlternatively, the commands that need to be executed can be given directly in this field.                  

  1. Click Save. A new script will be created. 



Points to ponder
  1. Either commands can be given in the Content field or you can choose and attach a script file in the Script File field.
  2. When a script file is attached, the name of the file is assigned to the Name field by default, which can be renamed, and the commands from the attached file will be automatically displayed in the Content field.   

How to execute Scripts in Messages
In request data of the message, the scripts are passed using the following keys:
For Shell Script  
"command": "sh <SSH_DIR>/<scriptFileName>" (Ex: "sh <SSH_DIR>/display.sh")
For PowerShell Script
"script-name": "<scriptFileName>.ps1" (Ex: "script-name": "display.ps1") 

Edit a Script   

To update an existing script:

  1. Navigate to(settings) >> Advanced >> Bridge >> select Scripts.

  2. In the list of scripts loaded, click on the script name you want to edit.

  3. Make the required modifications and click Save.


Delete a script   

To remove a script from Qntrl,

  1. Navigate to(settings) >> Advanced >> Bridge >> select Scripts.

  2. Hover over the name of the script you want to delete, click the mouse over action menu, and select the Delete menu item.

  3. Confirm the delete action.


 


    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.