AgentSkillsCN

Agents

当您需要管理Atera RMM代理时,可使用此技能:对受管设备进行列表查看、搜索定位、实时监控或执行命令操作。本技能涵盖代理信息、在线/离线状态、PowerShell脚本执行以及代理生命周期管理,是MSP技术人员通过Atera RMM高效管理终端设备的必备工具。

SKILL.md
--- frontmatter
description: >
  Use this skill when working with Atera RMM agents - listing, searching,
  monitoring, or executing commands on managed devices. Covers agent
  information, online/offline status, PowerShell execution, and agent lifecycle.
  Essential for MSP technicians managing endpoints through Atera RMM.
triggers:
  - atera agent
  - rmm agent
  - atera device
  - agent status
  - agent online
  - agent offline
  - powershell atera
  - run script atera
  - managed device
  - endpoint atera

Atera Agent Management

Overview

Atera agents are lightweight software installed on managed endpoints that provide remote monitoring and management capabilities. Agents report system information, health metrics, and enable remote execution of scripts and commands.

Agent Information Fields

Core Fields

FieldTypeDescription
AgentIDintUnique agent identifier
AgentNamestringAgent display name
MachineIDintMachine reference ID
CustomerIDintAssociated customer ID
CustomerNamestringCustomer display name
OnlinebooleanCurrent online status
LastSeenDatedatetimeLast communication timestamp

System Information

FieldTypeDescription
MachineNamestringComputer hostname
DomainNamestringAD domain (if joined)
OSstringOperating system name
OSVersionstringOS version/build
OSTypestringWindows, Mac, Linux
OSSerialNumberstringOS serial number
ProcessorstringCPU model
MemorylongTotal RAM in bytes

Network Information

FieldTypeDescription
IPAddressesstringComma-separated IP list
MacAddressesstringNetwork adapter MACs
LastIPAddressstringMost recent IP

Agent Status

FieldTypeDescription
AgentVersionstringInstalled agent version
CreatedDatedatetimeWhen agent was installed
MonitoredbooleanMonitoring enabled
MonitoredStatusstringMonitoring state
FavoritebooleanMarked as favorite

Hardware Details

FieldTypeDescription
VendorstringHardware manufacturer
VendorSerialNumberstringDevice serial number
VendorModelstringDevice model
VendorBrandModelstringFull brand/model string

API Patterns

List All Agents (Paginated)

http
GET /api/v3/agents?page=1&itemsInPage=50
X-API-KEY: {api_key}

Response:

json
{
  "items": [
    {
      "AgentID": 98765,
      "AgentName": "DESKTOP-ABC123",
      "MachineName": "DESKTOP-ABC123",
      "CustomerID": 12345,
      "CustomerName": "Acme Corporation",
      "Online": true,
      "LastSeenDate": "2024-02-15T14:30:00Z",
      "OS": "Windows 11 Pro",
      "OSType": "Windows",
      "Processor": "Intel Core i7-12700",
      "Memory": 34359738368,
      "IPAddresses": "192.168.1.100,10.0.0.50",
      "AgentVersion": "2.0.1.25",
      "Monitored": true
    }
  ],
  "totalItems": 500,
  "page": 1,
  "itemsInPage": 50,
  "totalPages": 10
}

Get Agent by ID

http
GET /api/v3/agents/{agentId}
X-API-KEY: {api_key}

Response:

json
{
  "AgentID": 98765,
  "AgentName": "DESKTOP-ABC123",
  "MachineName": "DESKTOP-ABC123",
  "DomainName": "ACME.LOCAL",
  "CustomerID": 12345,
  "CustomerName": "Acme Corporation",
  "Online": true,
  "LastSeenDate": "2024-02-15T14:30:00Z",
  "OS": "Windows 11 Pro",
  "OSVersion": "10.0.22621",
  "OSType": "Windows",
  "OSSerialNumber": "00330-80000-00000-AA123",
  "Processor": "Intel(R) Core(TM) i7-12700 CPU @ 2.10GHz",
  "Memory": 34359738368,
  "IPAddresses": "192.168.1.100",
  "MacAddresses": "00:1A:2B:3C:4D:5E",
  "Vendor": "Dell Inc.",
  "VendorSerialNumber": "ABC1234567",
  "VendorModel": "OptiPlex 7090",
  "AgentVersion": "2.0.1.25",
  "CreatedDate": "2023-06-15T09:00:00Z",
  "Monitored": true,
  "MonitoredStatus": "Healthy"
}

Get Agents by Customer

http
GET /api/v3/agents/customer/{customerId}
X-API-KEY: {api_key}

Get Agent by Machine Name

http
GET /api/v3/agents/machine/{machineName}
X-API-KEY: {api_key}

Delete Agent

http
DELETE /api/v3/agents/{agentId}
X-API-KEY: {api_key}

Response:

json
{
  "ActionID": 12345,
  "Success": true
}

PowerShell Execution

Run PowerShell Script

http
POST /api/v3/agents/{agentId}/powershell
X-API-KEY: {api_key}
Content-Type: application/json
json
{
  "Script": "Get-Service | Where-Object {$_.Status -eq 'Running'} | Select-Object Name, DisplayName"
}

Response:

json
{
  "ActionID": 55555,
  "Status": "Queued",
  "Message": "Script queued for execution"
}

PowerShell Best Practices

  1. Keep scripts concise - Long-running scripts may timeout
  2. Handle errors - Use try/catch blocks
  3. Return structured data - Use Select-Object for clean output
  4. Avoid interactive commands - No prompts or user input
  5. Test locally first - Validate before remote execution

Common PowerShell Commands

Get system information:

powershell
Get-ComputerInfo | Select-Object CsName, WindowsVersion, OsArchitecture

Check disk space:

powershell
Get-WmiObject Win32_LogicalDisk | Select-Object DeviceID, Size, FreeSpace

List running processes:

powershell
Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 10 Name, WorkingSet

Check Windows updates:

powershell
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5

Restart a service:

powershell
Restart-Service -Name "Spooler" -Force

Agent Online Status

Checking Online Status

The Online field indicates current connectivity:

StatusDescriptionAction
trueAgent communicatingCommands available
falseAgent not respondingCheck network/power

Handling Offline Agents

  1. Check LastSeenDate - Determine when agent was last online
  2. Verify network - Ensure device has connectivity
  3. Check power state - Device may be powered off
  4. Review alerts - Look for related alerts
  5. Contact user - Verify device status

Offline Thresholds

DurationInterpretationAction
< 5 minTemporaryNormal fluctuation
5-30 minShort outageMonitor
30 min - 4 hrExtended outageInvestigate
> 4 hrLong-term offlineContact customer

Agent Lifecycle

Installation

  1. Generate installer from Atera portal
  2. Download and run on target device
  3. Agent registers with Atera cloud
  4. Appears in agent list within minutes

Monitoring

  • Agent sends heartbeat every few minutes
  • Reports system metrics and alerts
  • Receives commands from portal/API

Removal

  1. Uninstall from device (if accessible)
  2. Delete via API or portal
  3. Agent record removed from system

Error Handling

Common API Errors

CodeMessageResolution
400Invalid agent IDVerify agent exists
401UnauthorizedCheck API key
403ForbiddenVerify permissions
404Agent not foundConfirm agent ID
429Rate limitedWait and retry (700 req/min)

PowerShell Execution Errors

ErrorCauseResolution
Agent offlineDevice not connectedWait for reconnection
Script timeoutExecution too longSimplify script
Access deniedInsufficient privilegesCheck agent permissions
Syntax errorInvalid PowerShellValidate script locally

Best Practices

  1. Monitor agent health - Track online/offline patterns
  2. Keep agents updated - Use latest agent version
  3. Use meaningful names - Rename agents for clarity
  4. Group by customer - Organize for efficient management
  5. Review regularly - Remove stale/decommissioned agents
  6. Document scripts - Comment PowerShell for reuse
  7. Test before bulk execution - Validate on single agent first

Related Skills