---
title: "Modify Scripts for Automation"
slug: "modify-scripts-for-automation"
updated: 2025-07-03T07:00:23Z
published: 2025-07-03T07:00:23Z
canonical: "support.controlup.com/modify-scripts-for-automation"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.controlup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Modify Scripts for Automation

Some scripts might need to be modified to be used as an Automatic Action if they require additional user interaction. The following article describes some of the ways you can modify scripts for automation.

## Setting Argument Values for Interactive Scripts

Because automated actions run independently, interactive scripts cannot be used. However, if you have an interactive script that you want to use as an automated action, you can use it if you set a default value for each of the arguments that would otherwise be supplied interactively.

To set a default value for an argument:

1. In a ControlUp **Console**, in the My Organization screen, in the **Home** ribbon bar, select **Script Actions.** The **Scripts Management** window opens.
2. Double-click the script. The **Modify Script Action** window opens.
3. In the **Arguments** tab, double-click an argument whose default value you want to set. The **Script Argument** dialog box opens.
4. Under **Default**, enter the default value for the argument, and then select **OK**. The value appears in the list of arguments, under **Default**. ![Script Argument dialog box with 'PC27' entered in the Default field.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28430%29.png)
5. Repeat the last two steps for every other argument whose default value you want to set.
6. Select **OK**, and then, in the **Scripts Management** window, select **Close**.

## Specifying Default Credentials for an Interactive Script

Script Actions whose security context is **Prompt upon execution**, which receive their credentials interactively, cannot be used as automated actions unless default shared credentials are specified in the script settings.

When no default shared credentials are specified for these types of Script Actions, they appear in gray in the list of available scripts for a trigger. If you select one, a notification like the one in the illustration below is added to the **Follow-up Action** screen. If you have the **Manage Script Actions** permission, you can specify the credentials to use in the script’s settings. In this case, a **Click here to edit the Script Action** link also appears. ![Follow-up Action screen with the Script Action link displayed.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28531%29.png)

**Note**

If you set up default credentials for a script to use when it runs automatically, as explained here, and the script is later run manually, the user is still prompted to enter the credentials to use. The credentials specified in the script’s settings appear as the default credentials, but they can be modified.

To specify the credentials a Script Action should use:

1. In the **Follow-up Action** screen, select **Click here to edit the Script Action**. The script’s **Properties** window opens.
2. In the **Settings** tab, under **Security Context**, in the **Default shared credentials for automation** field, select the credentials to use when the script is run automatically. ![The script’s Properties window displayed with Settings tab and the Default shared credentials for automation field selected.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/360003593777image047.png)
3. Select **OK**.

## Specifying Default (Current User) Credentials for Running a Script

Script Actions whose security context is **Default (Current User)** cannot be used as automated actions because no Current User is defined for them. In order to enable such scripts to be used as automated actions, default shared credentials must be specified in the script settings.

When no default shared credentials are specified for these types of Script Actions, they appear in gray in the list of available scripts for a trigger. If you select one, a notification like the one in the illustration below is added to the **Follow-up Action** screen. If you have the **Manage Script Actions** permission, you can specify the credentials to use in the script’s settings. In this case, a **Click here to edit the Script Action** link also appears. ![Follow-up Action screen with the Click here to edit the Script Action link displayed.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/360003593797image0451.png)

**Note**

If you set up default credentials for a script to use when it runs automatically, as explained here, and the script is later run manually, the credentials of the current user are used.

To specify the credentials an automated-action script should use instead of Default (Current User):

1. In the Follow-up Action screen, select Click here to edit the Script Action. The script’s Properties window opens.
2. In the Settings tab, under Security Context , in the Default shared credentials for automation field, select the credentials to use when the script is run automatically. ![The script’s Properties window with shared credentials selected.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28533%29.png)
3. Select **OK**.

## Specifying the Computer on which to Run a Script

Script Actions whose execution context is **Other computer** prompt the user to select the machine on which they will run, and therefore cannot be used as automated actions. In order to enable them to be used as automated actions, the computer on which to run them can be specified in the Script Action’s settings.

When no default computer is specified for these types of Script Actions, they appear in gray in the list of available scripts for a trigger. If you select one, a notification like the one in the illustration below is added to the **Follow-up Action screen**. If you have the **Manage Script Actions**, you can specify the computer to use in the script’s settings. In this case, a **Click here to edit the Script Action** link also appears. ![Follow-up Action screen with the Script Action link displayed.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28534%29.png)

**Note**

If you specify a default target computer for a script to use when it runs automatically, as explained here, and the script is later run manually, the user is still prompted to select the machine to use. The machine in the script’s settings appears as the default, but it can be modified.

To specify the computer on which the Script Action should run:

1. In the **Follow-up Action** screen, select **Click here to edit the Script Action**. The script’s **Properties** window opens.
2. In the **Settings** tab, under **Execution Context**, select the![360003593957image053.gif](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/360003593957image053.gif)button. ![Other Computer Properties window with the Actions button selected.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28432%29.png)A **Choose Computer** dialog box opens. ![Choose Computer dialog box.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28436%29.png)
3. In the grid, select the machine to run the script on when it is run automatically, and then select **OK**. The dialog box closes and the selected machine appears in the script’s Execution Context settings. ![Other Computer Properties window with the selected machine's script in the Execution Context settings.](https://cdn.document360.io/098100b7-b9da-4bea-b4b9-017140ab863e/Images/Documentation/image%28435%29.png)
4. Select **OK**.

## Setting Up Pass-Through Authentication

If you do not want to include a plaintext password in a PowerShell Script Action, you can use pass-through authentication instead. To do this, you must configure the script to run on the Console with the **Default (Current User)** security context and specify appropriate default shared credentials. Then, do not specify any credentials for the script to use when it connects to VIServer. The lack of credentials there invokes pass-through authentication, and the default credentials you specified will be used to connect to VIServer and run the script.

To set up pass-through authentication for a PowerShell script, in the script’s settings, configure the following:

| **Setting** | **Configuration** |
| --- | --- |
| Execution Context | Select **ControlUp Console**. |
| Security Context | 1. Select **Default (Current User)**. 2. Under **Default shared credentials for automation**, select the credentials to use. |
