Assets · Windows agent

How to install the laptop agent

This standalone manual explains how to enroll a Windows laptop so it reports power on/off, heartbeat, and IP / VPN data to the central server.

Server URL: https://assets.irandevops.ir
Reports: https://assets.irandevops.ir/dashboard

1. What you need

2. Copy files to the laptop

Copy the whole agent/windows directory to:

C:\Assets\agent\windows

It must contain at least:

3. Install (Administrator PowerShell)

  1. Open Windows PowerShell as Administrator.
  2. Run:
cd C:\Assets\agent\windows
.\Install-OutdeskAgent.ps1 `
  -ServerUrl "https://assets.irandevops.ir" `
  -DeviceId "LAP-1042" `
  -AssignedTo "Reza Mohammadi" `
  -AgentToken "optional-shared-secret" `
  -Country "IR"

Replace LAP-1042 / person name / country per laptop.
-AgentToken must match OUTDESK_AGENT_TOKEN in /srv/assets/.env on the server (if token enforcement is enabled). If the server has OUTDESK_REQUIRE_TOKEN=0, you may pass an empty token.

4. What the installer does

Item Detail
Install path C:\ProgramData\Outdesk
Outdesk PowerOn Task Scheduler — at startup
Outdesk PowerOff Planned shutdown/restart (Event ID 1074)
Outdesk Heartbeat Every 10 minutes

Each event POSTs JSON to https://assets.irandevops.ir/api/telemetry.

5. Verify

cd C:\ProgramData\Outdesk
.\Send-OutdeskEvent.ps1 -EventType heartbeat

Then open Reports and confirm the laptop appears (hostname, public IP, IP status).

Invoke-RestMethod -Method Post `
  -Uri "https://assets.irandevops.ir/api/telemetry" `
  -ContentType "application/json" `
  -Body (@{
    deviceId="LAP-9999"
    hostname=$env:COMPUTERNAME
    username=$env:USERNAME
    assignedTo="Test User"
    eventType="power_on"
    publicIp="203.0.113.10"
    localIp="192.168.1.10"
    vpnConnected=$false
    osVersion=(Get-CimInstance Win32_OperatingSystem).Caption
    country="IR"
  } | ConvertTo-Json)

6. Uninstall

cd C:\Assets\agent\windows
.\Uninstall-OutdeskAgent.ps1

7. Mass deploy tips