Skip to main content

Create new command after agent installation

Learn how to create a command to automatically run after the agent installation.

Create Command After Agent Installation

The Create Command After Agent Installation feature in Trio allows IT administrators to configure a command that runs automatically on a device immediately after the Trio Agent is installed. This ensures that essential scripts, configurations, or custom setup tasks are executed without manual intervention.

What It Does

This feature automates the execution of specific commands or scripts right after the agent installation process. It’s ideal for post-install tasks such as enabling services, applying configurations, or deploying initial setup scripts across Windows and macOS devices.

Steps to Create a Post-Installation Command

  1. Go to:
    Command CenterCommandsCreate New

  2. Command Settings

    • Command Name: Enter a name that describes the purpose of the command (e.g., Enable Firewall).

    • Description (Optional): Add details to help identify the command later.

    • Operating System: Choose the target OS (Windows or macOS).

    • Environment: Select the command environment — CMD or PowerShell for Windows, Shell for macOS.

    • Command: Enter or paste the script/command you want to execute. You can also use the Copy button to duplicate existing templates.

  3. Select How This Event Will Run

    • Use “Smart Defaults”: Toggle this on to automatically apply recommended timeouts and expirations.

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

    • Timeout: Define the maximum duration (in seconds) the system will wait for the command to complete.

  4. Files (Optional)

    • Upload Attached File: Add any required files or scripts (max 20MB).

    • File Destination: Specify where the file should be saved on the device (e.g., C:\Windows\Temp\setup.ps1).

    • After uploading, the files appear in the list below with their destination paths.

  5. Create the Command
    Review your settings, then click Create. The command will automatically run on each newly enrolled device after the Trio Agent installation is complete.

Tips

  • Use this feature to deploy baseline scripts right after enrollment—such as enabling BitLocker, setting local policies, or preparing system directories.

  • Combine with Smart Defaults to ensure consistent timing and expiration behavior across all devices.

  • Uploaded files remain available for reuse in future commands.

Example Use Cases

  • Automatically install required software after agent deployment.

  • Run cleanup or initialization scripts.

  • Apply company-specific configuration immediately after enrollment.

Did this answer your question?