Skip to main content

Create Commands from macOS Templates

Execute macOS bash command templates via Trio Command Center for system monitoring, user management, and software updates.

Prerequisites

  • Required permissions: Command Center access

  • Supported platforms: macOS devices enrolled in Trio

  • Time estimate: 5-10 minutes per command

  • Additional requirements: Target devices must be online for immediate execution

Before You Start

macOS command templates execute pre-built bash scripts on your managed macOS devices. These templates perform system information gathering, software management, monitoring operations, and system configurations.

Templates eliminate script writing and ensure consistent execution across your device fleet. Created commands can be assigned to individual devices or AutoPilots for automated deployment.

Review available templates to understand their specific functions and requirements before creating commands.


Step 1: Access Command Templates

  1. Navigate to Fleet > Command Center

  2. Click All Templates

  3. Expected result: Template library displays with Windows and Mac options

Available macOS templates:

  • List All Users: List all local user accounts on macOS, excluding system accounts

  • List Available Updates: List available software updates on the macOS device

  • Refresh Login Window: Force a refresh of the macOS login window

  • Set Auto Logout Delay: Set the auto logout delay for the macOS system

  • Homebrew Updater: Update Homebrew packages

  • Disk Space Monitor: Monitor disk usage and alert on high usage

  • System Info Collector: Collect basic system information

Step 2: Select Command Template

  1. Locate your desired macOS template

  2. Click + Create next to the template name

  3. Expected result: Command creation modal opens

Step 3: Configure Basic Command Settings

  1. Enter descriptive name in Command Name field

  2. Modify template description if needed

  3. Click Confirm

  4. Expected result: Full command configuration page loads

Step 4: Configure Command Parameters

  1. Operating system: Mac is pre-selected for macOS templates

  2. Command section: Review the pre-populated bash script

  3. Expected result: Template-specific bash commands display

Command Section Details:

  • Template code appears with numbered lines showing bash script

  • Copy button allows copying command text

  • Code cannot be modified for template-based commands

  • All macOS templates use bash (#!/bin/bash) environment

Step 5: Configure Execution Settings

  1. Launch method: Select execution timing

    • Manually: Execute on-demand only

    • Repeating: Set recurring schedule

  2. User "Smart defaults": Toggle for optimized settings (recommended: enabled)

  3. Commands expiration after: Set command lifecycle (default: 7 Days)

  4. Timeout: Define maximum execution time (default: 120 seconds)

  5. Expected result: Execution parameters configured

Launch Method Options:

  • Manually: Commands execute only when triggered by administrator

  • Repeating: Commands run automatically based on configured schedule

Step 6: Create Command

  1. Click Create

  2. Expected result: "Command has been created!" confirmation appears

Step 7: Assign Command (Optional)

  1. Choose assignment option:

    • Assign: Configure immediate deployment

    • Done: Skip assignment for later configuration

  2. Expected result: Command ready for deployment or saved for later use

If selecting Assign:

Assign to AutoPilots

  1. Click Assign to autopilots

  2. Select target AutoPilots using checkboxes

  3. Click Confirm

  4. Expected result: Command assigned to selected AutoPilots

Assign to Devices

  1. Click Assign to devices

  2. Select target devices using checkboxes

  3. Click Confirm

  4. Expected result: Command assigned to selected devices

Assignment Limitations:

  • Cannot assign to both AutoPilots and devices simultaneously during initial creation

  • Additional assignments can be configured later from Command Center


macOS Template Details

List All Users

Type: Bash | User: System Purpose: List all local user accounts on macOS, excluding system accounts Use case: User account auditing and management Method: Queries local user database while filtering system accounts

List Available Updates

Type: Bash | User: System Purpose: List available software updates on the macOS device Use case: Software update management and compliance checking Method: Queries macOS software update service for pending updates

Refresh Login Window

Type: Bash | User: System Purpose: Force a refresh of the macOS login window Use case: Resolve login window display issues or apply new login policies Method: Restarts login window process to refresh display

Set Auto Logout Delay

Type: Bash | User: System Purpose: Set the auto logout delay for the macOS system Use case: Configure automatic logout for security compliance Method: Modifies system preferences for automatic logout timing

Homebrew Updater

Type: Bash | User: User Purpose: Update Homebrew packages Use case: Keep Homebrew packages current and system clean Functions: Updates Homebrew, upgrades packages, cleans up old versions, runs diagnostics Commands: brew update, brew upgrade, brew cleanup --prune=all, brew doctor

Disk Space Monitor

Type: Bash | User: System Purpose: Monitor disk usage and alert on high usage Use case: Proactive disk space management and alerting Method: Checks disk usage against threshold (90%) and reports alerts Output: Displays disk usage and alerts for partitions exceeding threshold

System Info Collector

Type: Bash | User: System Purpose: Collect basic system information Use case: System inventory and compatibility verification Information gathered: OS version, hardware model, memory, disk usage Method: Uses sw_vers, sysctl, system_profiler, and df commands


Next Steps

Immediate actions:

  • Monitor command execution from Commands tab

  • Review results when devices complete execution

  • Configure additional assignments if needed

Related configurations:

  • Set up AutoPilots for automated command deployment

  • Configure device groups for targeted command execution

  • Schedule recurring commands for ongoing monitoring


Troubleshooting

Command Creation Fails:

  • Symptoms: Create button unresponsive or error message

  • Cause: Missing required permissions or network connectivity

  • Solution: Verify Command Center access permissions and retry

Template Not Available:

  • Symptoms: Expected template missing from All Templates page

  • Cause: Template version compatibility or system configuration

  • Solution: Refresh page and verify Trio console version

Assignment Options Grayed Out:

  • Symptoms: Cannot select AutoPilots or devices during assignment

  • Cause: No compatible targets available or insufficient permissions

  • Solution: Verify target devices are enrolled and AutoPilots exist

Bash Script Execution Issues:

  • Symptoms: Template fails to execute properly on macOS device

  • Cause: Permission restrictions or missing dependencies

  • Solution: Verify device has necessary permissions and required tools installed

Homebrew Commands Fail:

  • Symptoms: Homebrew Updater template returns errors

  • Cause: Homebrew not installed or permission issues

  • Solution: Ensure Homebrew is installed and user has appropriate permissions

Did this answer your question?