# Run Script on Instance

> Run Script on Instance activity that runs a script on an instance on Google Cloud.

`UiPath.GoogleCloud.Activites.RunScriptOnInstance`

## Description

Runs a script on an instance.

:::note
* This activity is implemented
by actually running a startup script.
* This activity can be used
only when the instance has Status `Running`. The instance will be restarted in order for the script to be executed.
:::

## Project compatibility

Windows - Legacy | Windows | Cross-platform

## Configuration

### Common

* **DisplayName** - The display name of the activity.

### Input

* **Instance** - The instance on which the operation will be performed. This field supports only `GCPInstance` variables.
* **Script** - The script to run on the virtual machine.
* **ScriptKey** - The metadata key that corresponds to the type of script specified in **Script** parameter. Examples of such keys: "startup-script", "sysprep-specialize-script-bat".

### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

### Output

* **CommandOutput** - The result of the script execution.

### Timeout

* **ConsoleOutputTimeout** - Specifies the amount of time (in seconds) to wait for the console output after the machine is in 'Running' state. The value shall be less than **TotalExecutionTimeout**. This field supports only integer and `Int32` variables. The default value is **60** seconds.
* **TotalExecutionTimeout** - Specifies the amount of time (in seconds) to wait for the activity to run before an error is thrown. This field supports only integer and `Int32` variables. If not set, the activity runs until completion.
