DocsAgent SetupAgent Installation (Windows)

Agent Installation (Windows)

Install or upgrade the AsPeekIt agent on Windows with the install.ps1 script served by the platform. The agent runs as the idp-agent service and discovers processes, network connections, installed programs, hotfixes and certificates.


Requirements

The installer is written for Windows PowerShell 5.1 and checks these requirements before doing anything:

  • 64-bit Windows (the platform ships idp-agent-windows-amd64.exe).
  • PowerShell opened as Administrator.
  • Outbound HTTPS from the host to the platform (and to the agents mTLS host when the platform has one, see Automatic Agent mTLS).
  • A zone key (idpk_...) of the discovery zone the host belongs to: Agents page (Discovery section) > Zone keys on the zone.

Install or Upgrade

Open the Agents page, click "Install agent" on the zone and copy the command of the Windows tab. On a first install the script asks for the zone key with a hidden prompt. The same command upgrades an installed agent and keeps its configuration.

# Interactive install or upgrade (PowerShell as Administrator)
irm https://idp.example.com/agent/install.ps1 | iex

# Unattended: key from the environment (removed from the session afterwards)
$env:IDP_API_KEY = 'idpk_YOUR_ZONE_KEY'; irm https://idp.example.com/agent/install.ps1 | iex
Agents with status, version and mTLS certificate

Installer Settings

The Windows installer takes no arguments: set these environment variables in the session before running it.

  • IDP_API_KEY: the zone API key (must start with idpk_). On an upgrade it replaces the configured key.
  • IDP_AGENT_ID: unique agent id (default: the computer name in lower case). First install only.
  • IDP_AGENT_NAME: display name (default: the agent id). First install only.
  • IDP_URL: platform URL (default: the server the script was downloaded from). On an upgrade it replaces backend_url.
  • IDP_FORCE=1: reinstall even if the same version is already installed and running.

Note: The container image scan (--image-scan) is available on Linux only.

What the Installer Does

The script downloads the binary from <url>/agent/, verifies it against SHA256SUMS and then:

  • Locks C:\ProgramData\idp-agent down to SYSTEM and Administrators before writing the key.
  • First install: writes C:\ProgramData\idp-agent\agent.yaml with agent_id, agent_name, backend_url, the key, collection_interval_seconds: 300, log_file C:\ProgramData\idp-agent\agent.log and certificate_collection enabled. Upgrade: keeps the existing file.
  • Installs C:\Program Files\IDP Agent\idp-agent.exe, runs a dry-run collection (nothing sent) and creates (or updates) the service idp-agent ("IDP Agent", automatic start, LocalSystem) with a restart after 30 seconds on failure.
  • Starts the service and waits up to 180 seconds for the first successful report; if an upgrade fails, the previous binary and configuration are restored.
  • Skips everything when the same version is already running (unless IDP_FORCE=1, a new key or a new URL).

Verify the Agent

After the first report the agent appears on its zone in the Agents page with status online. The log is a file, not the Event Viewer.

Get-Service idp-agent
Get-Content C:\ProgramData\idp-agent\agent.log -Tail 20 -Wait

# Typical lines
# [main] AsPeekIt Agent 1.6.0 started
# [main] Data sent successfully

Uninstall

Stop and delete the service, then remove the program and data directories:

Stop-Service idp-agent
sc.exe delete idp-agent
Remove-Item -Recurse "$env:ProgramFiles\IDP Agent", "$env:ProgramData\idp-agent"

Pending Reboot

With system collection enabled (features.system_collection), every report carries system.reboot_required: true when Windows waits for a reboot to complete an update. The agent reads the registry only (no external command).

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending exists
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired exists
  • HKLM\SYSTEM\CurrentControlSet\Control\Session Manager has a non-empty PendingFileRenameOperations value (REG_MULTI_SZ)
  • Coverage scopes: system:reboot (collector kernel) is ok, or failed with the cause when the registry cannot be read (the field is then left out); system:kernel is skipped, since the kernel data is reported by Linux agents only