---
title: "How to Use the Script Repository"
url: "https://dm0bkdes5q7a2ls.productfruits.help/en/article/working-with-the-script-repository"
language: "en"
last_updated: "2025-12-16T23:06:15.830Z"
---

# How to Use the Script Repository

The Script Repository page enables you to manage the scripts that are applied to search results for remediation.

## Overview

-   This topic describes how to access and view your script repository, add a new script, view and change script encoding, test your script, export a script and delete a script.
-   See the topics below for more information.

## How to Access and View Your Script Repository

Procedure:

1.  From the left menu, click **Settings**.  
      
    ![](https://cdn-assets.productfruits.com/477438f7-2a28-49d5-a800-4a56a6205601)
2.  Click **Script Repository**.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/4.0%20Images/SettingsLeftMenu6.1.png)
3.  Scripts are displayed in a list sorted by:
4.  -   Script Name
    -   Script Description
    -   File Name
    -   Script Status
    -   More options  
          
        ![](https://docs.spirion.com/Content/Resources/Images/Assets/ScriptRepository.png)
5.  Click a the **Script Status** column to sort ascending.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/4.0%20Images/Scripts1.png)
6.  Click the **Script Status** column again to sort descending.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/4.0%20Images/Scripts2.png)
7.  Search for a script
8.  Your can search for scripts by
9.  -   Name
    -   Description
    -   File Name  
          
        ![](https://docs.spirion.com/Content/Resources/Images/Assets/4.0%20Images/Scripts5.png)
10.  Type the search query in the box and the results are sorted and displayed in the list below.  
       
     ![](https://docs.spirion.com/Content/Resources/Images/Assets/4.0%20Images/Scripts4.png)
11.  Click the **x** to clear the search term.

## How to Add a New Script

### Script Encoding Requirements by Version

-   Spirion Sensitive Data Platform version 13.5 and later requires scripts that are **UTF-8** encoded
-   Using scripts that are not **UTF-8** encoded may result in errors
-   Use the steps in the topics below to change the encoding of your non-compliant scripts to be compliant

### How to View and Change Script Encoding

To view, and if necessary, change your script, use the steps below:

1.  Open any script in the application Notepad++.
2.  To view the encoding, select the **Encoding** menu from the top of the application.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/EncodingUTF8BOM_551x323.png)
3.  If the encoding is not **UTF-8**, select **UTF-8** from the menu options.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/EncodingUTF8_477x216.png)
4.  Save the script.

### How to Test Your Script

To test your script, use the steps below:

1.  Re-upload the updated script with **UTF-8** encoding to the Script Repository.
2.  Use the updated script with **UTF-8** encoding.
3.  Use the script in a Scan Playbook.
4.  The script should now work as expected.

### How to Add and Use Your New Script

To add a new **UTF-8** script use the following procedure:

1.  In the top-right of the screen, click **Actions**.
2.  Click **Create Playbook**.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/Add%20New%20Script.png)
3.  In the **Custom Script Detail** pop-up window, fill in the following:
4.  -   **Script Name**: Type the name of the script.
    -   **Script Description**: Type the description of the script.
    -   **Upload Script**: Click the blue magnifying glass icon to upload a script file.
5.  Click **Save** to proceed or **Cancel** to discard.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/CustomScriptDetail.png)

## How to Export a Script

Use the following steps to export a script from the Settings > **Script Repository** page:

1.  In the top right corner of the page click the blue **Actions** button.
2.  Click **Export** from the sub-menu.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/Export%20Script.png)
3.  A .csv format file is downloaded to you local computer.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/Export.png)

## How to View or Edit Script Details

Use the following steps to view or edit the details of a script from the Settings > **Script Repository** page:

1.  Locate the script you wish to view or edit in the **Script Repository** table.
2.  In the far right column, click the more options menu (3 vertical dots).
3.  Click **View Details** from the sub-menu.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/View%20Details.png)
4.  The "Custom Script Details" pop-up window is displayed.
5.  Make changes as you desire to any of the following fields:
6.  -   **Script Name**: Type the script name.
    -   **Script Description**: Type the script description.
    -   **Upload Script**: Click the magnifying glass icon to upload a script file - for example, script.ps1 - from your local computer.  
          
        ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/Customer%20Script%20Detail.png)
7.  Click **Save** to save changes or **Cancel** to discard your changes.

## How to Delete a Script

Use the following steps to delete a script from the Settings > **Script Repository** page:

1.  Locate a script in the **Script Repository** table.
2.  In the far right column, click the more options menu (**...**).
3.  Click **Delete Script**.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/Delete%20Script.png)
4.  Click the blue **Confirm** button to confirm deletion or **Cancel** to abort the action.  
      
    ![](https://docs.spirion.com/Content/Resources/Images/Assets/2.0%20Images/Playbooks/Delete%20Script%202.png)
