---
title: Running a Script
slug: kronpam-reference-guide-3-9-0/running-a-script
docTags: 
createdAt: 2024-12-16T13:57:48.967Z
---

In Privileged Task Automation, authorized users run scripts on selected devices within a device group. This section explains how you select a script, choose target devices, run the script, and view its output.

:::hint{type="warning"}
You must hold the **kronpam.pta.scripts.moduleVisibility** portal function, and a script realm that includes one of your user groups must grant the **Play&#x20;**&#x70;ermission for the script group.
:::

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/sc4J6Mf_i8Q4nzZ9xnrST_image.png "Scripts")

To run a script on target devices:

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

2.    In the **Script Group** panel, select the script group, and then locate the script that you want to run.

3.    Click the green arrow button next to the script name.

4.    In the **Run Script** window, configure the following:

**Device Group**: Select the device group that contains the target devices.

**Device(s)**: Select one or more devices from the device group.

5.    Click **Next** to review the script details and the selected devices.

6.    Review the summary, and then click **Run** to run the script.

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/Pes_AiWFIHza2cOgISf0H_image.png "Executing Scripts")

