Skip to main content

Create custom commands

Learn how to create a custom command.

Updated over 3 weeks ago

Overview

Trio's Custom Commands feature allows administrators to remotely define and execute system-level scripts across managed devices. These commands can be tailored to specific environments (e.g., Windows CMD or PowerShell), scheduled for execution, and even include file attachments.


Step-by-Step: Creating a Custom Command

1. Navigate to the Commands Tab

  • From the Devices section, click on the Commands tab.

  • Click the + Add button on the top right to begin creating a new custom command.


2. Enter Command Details

A modal window titled “Create Custom Command” will appear.

  • Command Name: Provide a clear and descriptive name (e.g., Sample New Command namee).

  • Description: Include any relevant notes or purpose (e.g., switching to 64-bit environment on Windows).

  • Click Confirm to proceed.


3. Configure Command Settings

You'll be redirected to the detailed configuration screen.

Command Settings

  • Operating System: Choose between Windows or Mac.

  • Environment:

    • CMD (Command Prompt)

    • PowerShell

  • Command Field: Paste or write your command script here.
    Example:

    powershellCopyEdit## Enter the command within the "" on the below line $64BitCommand = "" ##------- Do not modify below this line ---------------- & (Join-Path ($PSHOME -replace 'syswow64', 'sysnative') powershell.exe) -Command "& {$64BitCommand}"


4. Select How the Event Will Run

  • Launch Method: Set to Run Manually or choose a scheduled option.

  • Use Smart Defaults: Toggle this on/off to automate common parameters.

  • Command Expiration After: Set how long the command remains valid (e.g., 3 Days).

  • Timeout After: Define how many seconds to wait before timing out (e.g., 120 seconds).


5. Attach Files (Optional)

If the command requires external files:

  • Drag & drop or click Upload under Upload attached file.

  • Define the File Destination on the target device (e.g., C:\Windows\Temp\File name.png).

  • Click Add to include it in the command.

  • Uploaded files will be listed under the Files list, with options to delete or filter.


6. Finalize the Command

  • Once all settings are configured and verified:

    • Click Create to finalize the custom command.

    • The command will now appear in your Commands list for execution or scheduling.


Notes

  • Uploaded files are limited to 20MB or smaller.

  • Ensure the command syntax matches the selected environment (CMD vs. PowerShell).

  • The command will not run until manually triggered or scheduled, depending on your launch method.

Did this answer your question?