{"id":3143,"date":"2026-02-20T10:47:44","date_gmt":"2026-02-20T10:47:44","guid":{"rendered":"https:\/\/zecurit.com\/help\/endpoint-management\/remote-script-execution\/script-repository\/"},"modified":"2026-02-20T11:42:33","modified_gmt":"2026-02-20T11:42:33","slug":"script-repository","status":"publish","type":"docs","link":"https:\/\/zecurit.com\/help\/endpoint-management\/remote-script-execution\/script-repository\/","title":{"rendered":"Script Repository"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>The <strong>Script Repository<\/strong> is Zecurit&#8217;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.<\/p>\n\n\n\n<p>Navigate to <strong>Manage \u2192 Deployment \u2192 Scripts Repository<\/strong> to access the repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What You Can Do in the Script Repository<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Write scripts inline<\/strong> using the built-in script editor (no external tool required)<\/li>\n\n\n\n<li><strong>Upload pre-built scripts<\/strong> from your local machine<\/li>\n\n\n\n<li><strong>Configure runtime arguments<\/strong> to customize script behavior without editing code<\/li>\n\n\n\n<li><strong>Set success exit codes<\/strong> to accurately track execution outcomes<\/li>\n\n\n\n<li><strong>Tag and categorize<\/strong> scripts for fast filtering across large libraries<\/li>\n\n\n\n<li><strong>View and filter<\/strong> scripts by platform, tags, modification date, or author<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Adding a New Script<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1 : Open the Add Script Dialog<\/h3>\n\n\n\n<p>Go to <strong>Manage \u2192 Scripts Repository<\/strong> and click the <strong>Add Script<\/strong> button (top-right). The script creation panel opens with two options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Write a Script<\/strong> : Opens the built-in editor where you type or paste your script code directly.<\/li>\n\n\n\n<li><strong>Upload<\/strong> : Opens a file browser to upload an existing script file from your computer.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2 : Enter Script Details<\/h3>\n\n\n\n<p>Fill in the following fields:<\/p>\n\n\n\n<p><strong>Script Name<\/strong> <em>(required)<\/em> Give the script a clear, descriptive name. Recommended format: <code>[Platform]-[Action]-[Target]<\/code> (e.g., <code>WIN-Cleanup-TempFiles<\/code>, <code>MAC-Brightness-Increase<\/code>).<\/p>\n\n\n\n<p><strong>Description<\/strong> <em>(optional)<\/em> 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&#8217;s purpose.<\/p>\n\n\n\n<p><strong>Script Arguments<\/strong> <em>(optional)<\/em> 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 <strong>Arguments<\/strong> column of the repository list.<\/p>\n\n\n\n<p><strong>Script Exit Code<\/strong> Default is <code>0<\/code> (standard success). If your script uses non-zero exit codes to indicate success (e.g., <code>0,3010<\/code> for success-with-reboot-pending), enter them comma-separated. Exit codes are used by Zecurit to determine whether execution succeeded or failed.<\/p>\n\n\n\n<p><strong>Platform<\/strong> <em>(required)<\/em> Select the target operating system, <strong>Windows<\/strong>, <strong>MAC<\/strong>, or <strong>Linux<\/strong>. This determines which interpreter handles execution on the endpoint and prevents cross-platform deployment errors.<\/p>\n\n\n\n<p><strong>Tags<\/strong> <em>(optional)<\/em> Add one or more tags to categorize the script. Examples: <code>cleanup<\/code>, <code>security<\/code>, <code>patching<\/code>, <code>onboarding<\/code>, <code>diagnostic<\/code>. Tags appear in the repository list and are filterable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3 : Save the Script<\/h3>\n\n\n\n<p>Click <strong>Add<\/strong> to save the script to the repository. It will immediately appear in the Scripts Repository list and become available for use in Deployment Policies.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Supported File Types by Platform<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Platform<\/th><th>Supported Extensions<\/th><\/tr><\/thead><tbody><tr><td>Windows<\/td><td><code>.ps1<\/code>, <code>.bat<\/code>, <code>.cmd<\/code>, <code>.vbs<\/code>, <code>.vbe<\/code>, <code>.js<\/code>, <code>.jse<\/code>, <code>.wsf<\/code>, <code>.wsc<\/code>, <code>.wsh<\/code>, <code>.reg<\/code>, <code>.exe<\/code>, <code>.msi<\/code>, <code>.vb<\/code><\/td><\/tr><tr><td>macOS<\/td><td><code>.sh<\/code>, <code>.bash<\/code>, <code>.scpt<\/code>, <code>.applescript<\/code>, <code>.py<\/code><\/td><\/tr><tr><td>Linux<\/td><td><code>.sh<\/code>, <code>.bash<\/code>, <code>.zsh<\/code>, <code>.ksh<\/code>, <code>.csh<\/code>, <code>.tcsh<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong> 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.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Managing Scripts in the Repository<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Searching and Filtering<\/h3>\n\n\n\n<p>Use the <strong>search icon<\/strong> (top-right of the list) to find scripts by name. Use the <strong>filter icon<\/strong> to narrow the list by platform or tags.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Viewing Script Details<\/h3>\n\n\n\n<p>Click the <strong>three-dot menu (\u22ee)<\/strong> next to any script to access actions including <strong>Edit<\/strong>, <strong>Clone<\/strong>, and <strong>Delete<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Editing an Existing Script<\/h3>\n\n\n\n<p>Select <strong>Edit<\/strong> 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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cloning a Script<\/h3>\n\n\n\n<p>Select <strong>Clone<\/strong> 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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Deleting a Script<\/h3>\n\n\n\n<p>Select <strong>Delete<\/strong> 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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Repository List Columns Explained<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Column<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Script Name<\/td><td>Name of the script as entered during creation<\/td><\/tr><tr><td>Description<\/td><td>Brief description (shows <code>--<\/code> if empty)<\/td><\/tr><tr><td>Platform<\/td><td>Target OS: Windows, MAC, or Linux<\/td><\/tr><tr><td>Arguments<\/td><td>Runtime arguments defined for the script<\/td><\/tr><tr><td>Modified By<\/td><td>Name of the user who last modified the script<\/td><\/tr><tr><td>Tags<\/td><td>Assigned tags for categorization<\/td><\/tr><tr><td>Modified Time<\/td><td>Timestamp of the last modification<\/td><\/tr><tr><td>Actions<\/td><td>Three-dot menu for Edit, Clone, Delete<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Use Case: Setting Up a Disk Cleanup Script<\/h2>\n\n\n\n<p><strong>Scenario:<\/strong> Your IT team needs to run a weekly disk cleanup across all Windows workstations to clear temporary files and browser caches.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Manage \u2192 Scripts Repository \u2192 Add Script<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Write a Script<\/strong> and paste your PowerShell cleanup script.<\/li>\n\n\n\n<li>Set <strong>Script Name<\/strong> to <code>WIN-Cleanup-TempFiles-Weekly<\/code>.<\/li>\n\n\n\n<li>Add <strong>Description<\/strong>: &#8220;Clears %TEMP%, browser caches, and Windows Update cache. Expected runtime: 2\u20135 min.&#8221;<\/li>\n\n\n\n<li>Leave <strong>Arguments<\/strong> blank (or add a target directory argument if parameterized).<\/li>\n\n\n\n<li>Set <strong>Exit Code<\/strong> to <code>0<\/code>.<\/li>\n\n\n\n<li>Set <strong>Platform<\/strong> to <strong>Windows<\/strong>.<\/li>\n\n\n\n<li>Add <strong>Tags<\/strong>: <code>cleanup<\/code>, <code>maintenance<\/code>, <code>scheduled<\/code>.<\/li>\n\n\n\n<li>Click <strong>Add<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p>The script is now available in the repository. Proceed to create a <strong>Deployment Policy<\/strong> to schedule and target it.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\ud83d\udca1 <strong>Tip:<\/strong> Check <a href=\"https:\/\/zecurit.com\/script-hub\/\">Zecurit Script Hub<\/a> for a free, pre-tested scripts, you can import directly into the repository.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Related<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/zecurit.com\/help\/endpoint-management\/remote-script-execution\/script-deployment-policy\/\">Deployment Policy for Scripts<\/a> \u2192<\/li>\n\n\n\n<li><a href=\"https:\/\/zecurit.com\/help\/endpoint-management\/remote-script-execution\/associate-script-deployment-policy\/\">Associate Policy to Devices\/Groups<\/a> \u2192<\/li>\n\n\n\n<li><a href=\"https:\/\/zecurit.com\/help\/endpoint-management\/remote-script-execution\/script-best-practices\/\">Script Best Practices<\/a> \u2192<\/li>\n\n\n\n<li><a href=\"https:\/\/zecurit.com\/script-hub\/\">Zecurit Script Hub<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"featured_media":0,"parent":3019,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-3143","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/docs\/3143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/comments?post=3143"}],"version-history":[{"count":2,"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/docs\/3143\/revisions"}],"predecessor-version":[{"id":3159,"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/docs\/3143\/revisions\/3159"}],"up":[{"embeddable":true,"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/docs\/3019"}],"next":[{"title":"Deployment Policy for Scripts","link":"https:\/\/zecurit.com\/help\/endpoint-management\/remote-script-execution\/script-deployment-policy\/","href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/docs\/3144"}],"wp:attachment":[{"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/media?parent=3143"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/zecurit.com\/help\/wp-json\/wp\/v2\/doc_tag?post=3143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}