Script Repository

⌘K

Overview

The Script Repository is Zecurit’s centralized library for all your automation scripts. It acts as the single source of truth for every script your team uses, from one-off diagnostic tools to recurring maintenance workflows. All 1000+ (or however many you add) scripts are stored, versioned, and accessible from one place, eliminating scattered scripts stored on individual workstations.

Navigate to Manage → Deployment → Scripts Repository to access the repository.

What You Can Do in the Script Repository

  • Write scripts inline using the built-in script editor (no external tool required)
  • Upload pre-built scripts from your local machine
  • Configure runtime arguments to customize script behavior without editing code
  • Set success exit codes to accurately track execution outcomes
  • Tag and categorize scripts for fast filtering across large libraries
  • View and filter scripts by platform, tags, modification date, or author

Adding a New Script

Step 1 : Open the Add Script Dialog

Go to Manage → Scripts Repository and click the Add Script button (top-right). The script creation panel opens with two options:

  • Write a Script : Opens the built-in editor where you type or paste your script code directly.
  • Upload : Opens a file browser to upload an existing script file from your computer.

Step 2 : Enter Script Details

Fill in the following fields:

Script Name (required) Give the script a clear, descriptive name. Recommended format: [Platform]-[Action]-[Target] (e.g., WIN-Cleanup-TempFiles, MAC-Brightness-Increase).

Description (optional) Describe what the script does, its prerequisites, expected runtime, and any side effects. Well-documented scripts reduce troubleshooting time and help teammates understand the script’s purpose.

Script Arguments (optional) Enter any runtime parameters you want to pass to the script at execution time. Arguments allow script reuse across different scenarios, the same cleanup script can target different directories by passing the directory path as an argument. Arguments appear in the Arguments column of the repository list.

Script Exit Code Default is 0 (standard success). If your script uses non-zero exit codes to indicate success (e.g., 0,3010 for success-with-reboot-pending), enter them comma-separated. Exit codes are used by Zecurit to determine whether execution succeeded or failed.

Platform (required) Select the target operating system, Windows, MAC, or Linux. This determines which interpreter handles execution on the endpoint and prevents cross-platform deployment errors.

Tags (optional) Add one or more tags to categorize the script. Examples: cleanup, security, patching, onboarding, diagnostic. Tags appear in the repository list and are filterable.

Step 3 : Save the Script

Click Add to save the script to the repository. It will immediately appear in the Scripts Repository list and become available for use in Deployment Policies.

Supported File Types by Platform

PlatformSupported Extensions
Windows.ps1, .bat, .cmd, .vbs, .vbe, .js, .jse, .wsf, .wsc, .wsh, .reg, .exe, .msi, .vb
macOS.sh, .bash, .scpt, .applescript, .py
Linux.sh, .bash, .zsh, .ksh, .csh, .tcsh

Note: Zecurit automatically routes execution to the appropriate interpreter on the target device based on the file extension and selected platform. No manual interpreter path configuration is needed.

Managing Scripts in the Repository

Searching and Filtering

Use the search icon (top-right of the list) to find scripts by name. Use the filter icon to narrow the list by platform or tags.

Viewing Script Details

Click the three-dot menu (⋮) next to any script to access actions including Edit, Clone, and Delete.

Editing an Existing Script

Select Edit from the three-dot menu. You can modify the script code, description, arguments, exit codes, tags, or platform. Saving an edit creates an updated version of the script.

Cloning a Script

Select Clone to create an exact copy of the script. Useful when you want to create a platform-specific variant or adapt a script for a different use case without starting from scratch.

Deleting a Script

Select Delete to permanently remove a script from the repository. Confirm the action in the dialog. Scripts actively referenced in published Deployment Policies should be removed from those policies before deletion to avoid deployment errors.

Repository List Columns Explained

ColumnDescription
Script NameName of the script as entered during creation
DescriptionBrief description (shows -- if empty)
PlatformTarget OS: Windows, MAC, or Linux
ArgumentsRuntime arguments defined for the script
Modified ByName of the user who last modified the script
TagsAssigned tags for categorization
Modified TimeTimestamp of the last modification
ActionsThree-dot menu for Edit, Clone, Delete

Use Case: Setting Up a Disk Cleanup Script

Scenario: Your IT team needs to run a weekly disk cleanup across all Windows workstations to clear temporary files and browser caches.

  1. Go to Manage → Scripts Repository → Add Script.
  2. Click Write a Script and paste your PowerShell cleanup script.
  3. Set Script Name to WIN-Cleanup-TempFiles-Weekly.
  4. Add Description: “Clears %TEMP%, browser caches, and Windows Update cache. Expected runtime: 2–5 min.”
  5. Leave Arguments blank (or add a target directory argument if parameterized).
  6. Set Exit Code to 0.
  7. Set Platform to Windows.
  8. Add Tags: cleanup, maintenance, scheduled.
  9. Click Add.

The script is now available in the repository. Proceed to create a Deployment Policy to schedule and target it.

💡 Tip: Check Zecurit Script Hub for a free, pre-tested scripts, you can import directly into the repository.

Related

How can we help?