Oliver Kieselbach 0ac548bfce feat(bootstrap): two-stage loader and Authenticode-signed customer scripts (D-224)
Start-AutopilotMonitor.ps1 is the new stage 1 -- the file an administrator assigns in
Intune. It carries no enrollment logic: it downloads the published installer, verifies its
Authenticode signature, and runs it in the same process, passing through every remaining
argument. Assigning the installer directly stays supported and unchanged.

The point of the split is that the customer-held artifact stops changing. Today every
bootstrap change forces customers to replace their Intune copy, so the fleet runs a
distribution of script versions we do not control. It is also what makes script signing
worth doing: signing a file that gets swapped by hand each release is a one-off gain,
signing a loader that never changes is permanent.

The loader is deliberately minimal, because it is the one piece that cannot be fixed
remotely -- every guard placed in it would be frozen for years. All guards stay in stage 2.

Verification pins the certificate SUBJECT, never a thumbprint: certificates get renewed and
a deployed loader cannot be, so a thumbprint pin would strand the fleet at the next
renewal. A hash oracle was rejected for a different reason -- it would have to be fetched
from the same host as the script, so it could not survive a compromise of that host, while
the expected publisher travels inside the loader.

Fail-closed on verification, fail-soft on exit: nothing runs without a valid signature from
us (running unverified code as SYSTEM is the risk being removed here), but the loader still
exits 0, because a device without monitoring is acceptable and a failed enrollment step is
not. The accepted cost is that a device which can never fetch or verify stays silent.

Publisher changes:

- every published script is signed (loader, installer, both -Dev renders,
  Test-ShouldBootstrapAgent, Grant-AutopilotMonitorAddOn), and signing is the LAST
  transformation: it covers exactly the CRLF/UTF-8 bytes Get-PublishBytes produced, so
  nothing may normalise or re-encode them afterwards.
- signing is mandatory for a real publish. Only -DryRun may run unsigned, because the PR
  gate executes the publisher without any Azure login.
- comparisons against a published copy strip the signature block first. A timestamped
  signature differs on every run, so without stripping the version-bump guard and the
  drift check would report a change for every unchanged script.
- the bump guard became Assert-VersionBump and now covers the loader as well.
- version.json gains loaderVersion. Additive, no consumer yet: stage 2 is current by
  construction, so only stage 1's version says anything about a customer's Intune copy.
- -SignedOutputDir writes the exact uploaded bytes for the CI artifact, in a dry run too --
  that is how a signed script gets inspected before it reaches anyone.

publish-scripts.yml logs in with the signing identity first and only to fetch the Key Vault
token (azure/login sets the default az account and the storage login has to be the one that
stays), then publishes and offers the signed scripts as an artifact. build-agent.yml passes
the same parameters on a stable cutover.

Tests: 14 new Pester cases, including that a validly signed script from a FOREIGN publisher
is refused -- that is what an attacker with any code-signing certificate can produce. Full
bootstrap suite on Windows PowerShell 5.1: 43/43.

Not covered: the MSI runner still downloads stage 2 without verifying it, and the customer
docs still describe the direct assignment only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 18:48:21 +02:00
2026-09-08 15:48:28 +02:00
2026-09-06 13:13:42 +02:00

Autopilot Monitor logo Autopilot Monitor

Status License Website

Autopilot Monitor is an open-source, real-time monitoring and troubleshooting platform for Windows Autopilot and Microsoft Intune enrollment. It records enrollment events, application installations, policies, device state, and diagnostics while provisioning is still running, instead of collecting logs by hand after a failure. Administrators get live enrollment tracking, Enrollment Status Page (ESP) visibility, detailed session timelines, automated issue detection, on-demand diagnostics, fleet health analytics, and AI-assisted troubleshooting through a hosted Model Context Protocol (MCP) server.

The platform supports classic Windows Autopilot and modern Intune provisioning scenarios, including Windows Autopilot Device Preparation.

Availability

Autopilot Monitor is publicly available — the Community plan is free. Sign in with your work account at autopilotmonitor.com; new organizations complete a short activation step after first sign-in.

Autopilot Monitor dashboard showing live Windows Autopilot and Intune enrollment sessions Autopilot Monitor fleet health dashboard with Windows Autopilot enrollment analytics and success metrics

Autopilot Monitor session details showing device information, diagnostics, apps, policies, and enrollment status Windows Autopilot enrollment timeline showing ESP phases, application installs, policies, events, and errors

Key Features

  • Real-time Windows Autopilot monitoring — follow device provisioning while enrollment is still running
  • Detailed enrollment timelines — correlate Autopilot, ESP, Intune Management Extension, apps, policies, device state, and system events
  • Enrollment Status Page visibility — see which phase, application, or policy is delaying provisioning
  • Automated issue detection — define custom analysis rules that identify known failure patterns
  • Targeted evidence collection — gather registry values, event log entries, files, log-parser matches, and allow-listed commands when specific conditions are detected
  • On-demand diagnostics — request diagnostics packages from enrolled devices remotely
  • Fleet health analytics — success rates, deployment duration, device models, applications, errors, and recurring issues
  • Session reporting — inspect and share detailed enrollment information for individual devices
  • Windows Autopilot Device Preparation support — monitor Device Preparation deployments alongside classic Autopilot scenarios
  • Centralized agent configuration — control diagnostic behavior, automatic reboots, timezone adjustment, and other monitoring settings from the web dashboard
  • AI-assisted troubleshooting — query enrollment data through the built-in Model Context Protocol server

How it works

Autopilot Monitor consists of several components working together throughout Windows enrollment:

  • Bootstrap Script — PowerShell script deployed through Microsoft Intune that starts monitoring early in the provisioning process
  • Monitoring Agent — lightweight .NET application that collects telemetry and evidence during enrollment
  • Backend API — Azure Functions-based ingestion and processing pipeline
  • Web Dashboard — Next.js application for real-time monitoring, troubleshooting, and fleet analytics
  • MCP Server — Model Context Protocol server that lets AI assistants query Autopilot Monitor data in natural language

Windows Autopilot and Intune Troubleshooting

Autopilot Monitor helps investigate common Windows provisioning and enrollment problems such as:

  • Windows Autopilot deployments that fail or appear stuck
  • Enrollment Status Page (ESP) delays and unusually long deployment phases
  • Win32 application installation failures and slow application downloads
  • Intune Management Extension problems
  • Microsoft Entra join, Hybrid Join, and device registration issues
  • policies that block or delay provisioning
  • inconsistent behavior across hardware models and recurring failures affecting multiple devices

Because telemetry is collected during enrollment, many problems can be investigated without reproducing the issue or manually collecting logs from the affected device.

AI Integration (MCP)

Autopilot Monitor ships a hosted Model Context Protocol server. Connect Claude Desktop, VS Code, or any MCP client that speaks Streamable HTTP with OAuth, and ask questions like:

  • "Show me all failed enrollments from the last 24 hours and group them by failure reason."
  • "Why did session X fail, and which app install caused the delay?"
  • "Which devices had unusually long ESP application phases this week?"
  • "Which device models have the highest Autopilot failure rate?"
  • "Which devices in my fleet are affected by CVE-2024-30078?"

Server URL: https://mcp.autopilotmonitor.com/mcp — sign-in runs through your existing work account, access is scoped to your tenant exactly like in the portal, and the MCP server stores no credentials. Setup guide: AI Integration (MCP).

Documentation

Full admin documentation is available at docs.autopilotmonitor.com — deployment, configuration, monitoring, diagnostics, troubleshooting, analysis and gather rules, integrations, and AI-assisted troubleshooting.

Open Source

Autopilot Monitor is developed openly on GitHub. The source is published so that customers and security reviewers can see what runs on their devices and with their data: the repository contains the device agent, shared library, backend, web dashboard, and MCP server.

Feedback

Bug reports and feature requests go through Issues, questions and ideas through Discussions. Security issues are reported privately, see SECURITY.md. For a problem in your own tenant, the Report Session button in the portal is the fastest path.

License

This project uses a split licensing model. The root LICENSE is AGPL-3.0, which covers the server-side components; the device-side components carry their own MIT license file:

  • MIT License — Agent (src/Agent/) and Shared library (src/Shared/) — unrestricted use on end-user devices, no copyleft obligations
  • AGPL-3.0 — Backend (src/Backend/), Web Dashboard (src/Web/), and MCP Server (src/McpServer/) — modifications to server-side components remain open source, especially when deployed as a network service

The Shared library is MIT because it is a dependency of the MIT-licensed Agent. The license file inside each component directory is authoritative for that component.

S
Description
Windows Autopilot & Intune enrollment monitoring: live session timelines, fleet health, diagnostics, and an MCP server for AI-assisted troubleshooting.
Readme AGPL-3.0 60 MiB
Languages
C# 72.7%
TypeScript 25.7%
PowerShell 1%
JavaScript 0.5%