Overview
The Scripts feature in JetPatch allows users to automate tasks and execute custom scripts across the IT infrastructure. Administrators can define and schedule scripts to perform configuration changes, software installations, or system checks on multiple endpoints simultaneously.
Scripts can be either uploaded files or one-liner scripts written directly into the console.
| Note: Each script must be connected to a task and cannot run independently. |
Script Library
The Script Library contains the scripts you have created, and Built-In scripts created by JetPatch that cannot be changed in any way.
- Select System → Scripts from the main menu to view the Library.
- The Search bar in the top-left corner will let you search by Script name only.
- Filter options: Category and Created By.
- You can edit, delete, enable/disable, and download scripts by clicking on the action button on the right or one of the relevant icons.
- Scripts that are currently used by active Remediation Plans cannot be edited.
Enable / Disable a Script
You can enable or disable the scripts in your library. Note that a disabled script cannot be used.
| Script State | Effect on Tasks |
| Disabled | Tasks created based on a disabled script are saved but do not appear in the tasks list. |
| Enabled | Tasks created based on an enabled script are saved and appear in the tasks list. |
Create a New Script
- Select System → Scripts from the main menu.
- Click Add.
- Fill in the relevant details:
- Script Name
- Description
Configuration Tab
| Field | Description |
| Category | Choose a built-in category, general, or add a new category. |
| Operating System | Choose from the dropdown list. |
| Run Type | Choose the script run type. Supported types: Python, Shell/Bash, PowerShell, Perl, Batch, and Awk. |
| Script Source | Upload a file or enter a one-liner script directly. |
Exit Codes Tab
Add exit codes to your script to define expected outcomes.
| Tip: In Linux shell, you can run echo $? to get the expected exit code. |
Parameters Tab
| Field | Options | Description |
| Name | The parameter name. | |
| Type | Boolean, Number, String, Password, IP | The data type of the parameter. |
| Default Value | The default value for the parameter. | |
| Required | True / False | Whether the parameter is mandatory. |
- New scripts are set to Enabled by default. You can change this in the top right corner.
- Click Save.
Built-In Scripts
Built-In scripts are managed by JetPatch and cannot be edited, disabled, or deleted.
The B icon identifies a Built-In script in the library.
Related Articles
Comments
0 comments
Please sign in to leave a comment.