Skip to main content

Create Commands from Windows Templates

Execute Windows PowerShell and CMD templates via Trio Command Center for device management and system monitoring.

Prerequisites

  • Required permissions: Command Center access

  • Supported platforms: Windows devices enrolled in Trio

  • Time estimate: 5-10 minutes per command

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

Before You Start

Windows command templates execute pre-built PowerShell and CMD scripts on your managed Windows devices. These templates perform system information gathering, security configurations, performance monitoring, and troubleshooting operations.

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 Windows templates:

  • Get Windows Defender Settings: Retrieve complete Defender configuration

  • Windows - 64-Bit Command: Execute custom commands in 64-bit PowerShell environment

  • Exclude Trio Agent from Windows Defender: Add Trio_Agent.exe to Defender exclusions

  • Get Installed PowerShell Version: Return PowerShell version information

  • Get Logged In User: Identify currently logged-in user via WMI

  • Get OS Name and Version: Extract system information in formatted output

  • Power Plan Setter: Set power plan to high performance

  • Network Diagnostics: Run comprehensive network diagnostics

  • Service Status Reporter: Report status of critical services

  • Disk Cleaner: Clean temporary files and empty recycle bin

Step 2: Select Command Template

  1. Locate your desired Windows 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: Windows is pre-selected for Windows templates

  2. Environment: PowerShell or CMD is pre-selected based on template type

  3. Command section: Review the pre-populated template code

  4. Expected result: Template-specific commands display

Command Section Details:

  • Template code appears with numbered lines

  • Copy button allows copying command text

  • Code cannot be modified for template-based commands

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


Windows Template Details

Get Windows Defender Settings

Type: PowerShell | User: System Purpose: Retrieve complete Windows Defender configuration Use case: Security audit and compliance verification Method: Executes Get-MpPreference using 64-bit PowerShell

Windows - 64-Bit Command

Type: PowerShell | User: System Purpose: Execute custom PowerShell commands in 64-bit environment Use case: When specific commands require 64-bit PowerShell execution Key feature: Automatically switches from 32-bit (syswow64) to 64-bit (sysnative) PowerShell

Exclude Trio Agent from Windows Defender

Type: PowerShell | User: System Purpose: Add Trio_Agent.exe to Windows Defender exclusions Use case: Prevent Defender from interfering with agent operations Target path: $env:SystemDrive\Program Files (x86)\Trio\Trio_Agent.exe

Get Installed PowerShell Version

Type: PowerShell | User: System Purpose: Return PowerShell version information Use case: Verify PowerShell compatibility before deploying complex scripts Output: Complete PowerShell version table

Get Logged In User

Type: PowerShell | User: System Purpose: Identify currently logged-in user Use case: User session monitoring and troubleshooting Method: WMI query against Win32_ComputerSystem

Get OS Name and Version

Type: PowerShell | User: System Purpose: Extract system information in structured format Use case: System inventory and compatibility verification Output: Hostname, OS name, and OS version in CSV format

Power Plan Setter

Type: CMD | User: System Purpose: Set power plan to high performance Use case: Optimize system performance for demanding applications Method: Uses powercfg command to activate SCHEME_MIN (high performance)

Network Diagnostics

Type: CMD | User: User Purpose: Run comprehensive network diagnostics Use case: Troubleshoot network connectivity issues Functions: IP configuration, ping tests, traceroute, Winsock reset

Service Status Reporter

Type: PowerShell | User: System Purpose: Report status of critical services Use case: Monitor essential Windows services health Monitored services: WinRM, Spooler, EventLog, DHCP

Disk Cleaner

Type: CMD | User: User Purpose: Clean temporary files and empty recycle bin Use case: Free up disk space and improve system performance Actions: Removes temporary files, empties recycle bin


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

PowerShell vs CMD Execution Issues:

  • Symptoms: Template fails to execute properly

  • Cause: Incorrect environment selection or permission conflicts

  • Solution: Verify template environment matches expected execution context

Did this answer your question?