Creating Parameterized Script
You can create a parameterized script from the Scripts tab.
To create a parameterized script, follow these steps:
- Navigate to Scripts > Scripts > Create > New Script.
The Create New Script page is displayed.
- In the Basic Information page, enter a Name and Description for the script.
- Click Next to view the Script Details page.
- In the Script Details page, complete the following fields:
Field Description Platform Select a platform from the list: - Unix
- Windows
- Linux
- Mac
Type of Script Select a script type from the list: - Custom Script
- Custom QID
Select Custom Script from the options listed. If you want to create a custom QID script, refer to Creating Custom QID Scripts.
Scripting Language Select a required Scripting Language from the list. The Scripting Language options change as per the selected platform. If you have selected the Windows platform, the following languages are displayed:
- PowerShell-Command
- PowerShell-Script
- Python
- VBScript
If you have selected the Linus, Unix, or Mac platform, the following languages are displayed:
- Lua
- Perl
- Python
- Shell
Category Select a category for the script from the list. Timeout limit Specify the Timeout limit in seconds, minutes, or hours. The Timeout limit lets you specify how long a script must be in execution. - The Timeout limit field only accepts whole numbers (integers).
- The Timeout limit for all Windows, Linux, and Unix assets is 3600 seconds, while the default value is 300 seconds.
Severity Select a severity value from the list ranging from 1 to 5, with 5 being the most severe and 1 the least severe. -
Select the Enter Script option to enter a script manually and define the parameter.
If you want to import a predefined parameterized script click the Select a Predefined Script option. For more information, refer to Import Predefined Script.
- Type or copy-paste the script in the Script box.
- Turn on the Define Script Parameters toggle and define parameters.
Defining parameters customizes the script behavior during the script execution.
- Click Next to view the Review and Confirm page.
-
Review the script and click Confirm & Save.
After creating a script, you can execute the script. For more information, refer to Executing Scripts.
Modify the Approved Script Content
The manager role can edit the content of the approved script.
To modify the approved script, follow these steps:
- Navigate to the Scripts tab.
- To edit a script, select an approved parameterized script and click Edit from the Quick Actions menu.
- In the Basic Information page, click Next.
The Script Details section is displayed.
- Modify the editable content as required.
- Click Next to view the Review and Confirm page.
- Review the script and click Update to save the changes.