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

# GoreloAction CLI (via PowerShell)

> Use the GoreloAction PowerShell CLI to generate alerts and write to custom asset fields from your scripts, with parameters for severity, name, and suppress.

GoreloAction is a command-line utility that enables PowerShell scripts to interact with Gorelo. It currently supports:

* Generating alerts.
* Writing to custom asset fields.

## Use GoreloAction

<Tabs>
  <Tab title="Generate alerts">
    Run the following command in your terminal, and replace `<String>` with the parameter values:

    ```powershell theme={null}
    GoreloAction -Alert -Severity <Int> -Name <String> -Description <String> -Suppress <Int>
    ```

    ### Parameters

    | Option         | Description                                                                                         |
    | -------------- | --------------------------------------------------------------------------------------------------- |
    | `-Alert`       | Specifies alert creation mode.                                                                      |
    | `-Severity`    | Sets the severity level (Integer) <ul><li>1: Critical</li><li>2: Error</li><li>3: Warning</li></ul> |
    | `-Name`        | Title/name of the alert in Gorelo.                                                                  |
    | `-Description` | Detailed description of the alert in Gorelo (optional).                                             |
    | `-Suppress`    | Alert suppression duration in hours (optional and defaults to 4, use 0 for no suppression).         |
    |                |                                                                                                     |

    #### Example

    ```powershell theme={null}
    GoreloAction -Alert -Severity 1 -Name "NameHere" -Description "DescriptionHere" -Suppress 0
    ```
  </Tab>

  <Tab title="Write to custom asset field">
    Run the following command in your terminal, and replace `<String>` with the parameter values:

    ```powershell theme={null}
    GoreloAction -SetCustomField -Name <String> -Value <String>
    ```

    #### Parameters

    | Option            | Description                                                                                                 |
    | ----------------- | ----------------------------------------------------------------------------------------------------------- |
    | `-SetCustomField` | Specifies custom field write mode.                                                                          |
    | `-Name`           | Field identifier: <ul><li>Format: `'asset.fieldname'`</li><li>Remove `$gorelo`: from the variable</li></ul> |
    | `-Value`          | Data to be stored in the field.                                                                             |

    #### Example

    ```powershell theme={null}
    GoreloAction -SetCustomField -Name 'asset.rustdeskPassword' -Value "SecurePassword123"
    ```
  </Tab>
</Tabs>
