---
title: Creating Script
slug: kronpam-reference-guide-3-8-0/creating-script
docTags: 
createdAt: 2024-12-16T13:51:01.181Z
---

Scripts in Privileged Task Automation are commands or tasks to be executed on target devices. Scripts can consist of a single line or multiple lines of commands. This section describes how authorized users can add scripts and configure dynamic fields within commands.

Before adding a script, an existing Script Group must be available. The user must have sufficient permissions to add scripts.

To add a script:

1.      Navigate to **Privileged Task Automation.**

2.      On the Scripts tab, click th&#x65;**&#x20;Add**. From the options that appear, selec&#x74;**&#x20;Add Script.**

3.      In the Add Script window, enter the following details:

- **Script Name:** Enter a descriptive name for the script.
- **Script Group:** Select the Script Group to which the script will belong.
- **Element Type:** Select the target device type for the script (e.g., Linux Server, Windows Server).
- **Script:** Enter the command(s) to be executed.

Use dynamic fields within commands to allow user input during script execution. A dynamic field is defined using the %value% format. Multiple variables with different names can be defined as well.

**Example:&#x20;**

`df -kh %partition%`

During execution, the user will be prompted to enter a value for %partition%.

4.      Once all fields are entered, click **Next&#x20;**&#x74;o proceed.&#x20;

5.      Review the script details and click **Save** to complete the process.

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/X1w6wH-HF8qjwYNW-0vpD_image.png "Adding a script")

