Deploying OpenClaw with Windows 365: A Practitioner's Guide to Custom Image Engineering and Deployment
Author: Kevin Kaminski, Microsoft MVP for Windows 365
This book is a comprehensive technical guide for IT administrators and platform engineers who need to deploy AI coding agents (specifically OpenClaw and Claude Code) onto Windows 365 Cloud PCs using custom images built with Azure Compute Gallery and Azure VM Image Builder. While OpenClaw is the anchor product and primary focus, the book also covers Claude Code, OpenAI Codex CLI, and OpenSpec as complementary tools in the AI coding agent ecosystem, each with its own installation, configuration, and security considerations. It covers everything from infrastructure provisioning through Terraform, to the build pipeline, to post-provisioning operations, to the security architecture required to contain autonomous AI agents in an enterprise environment.
The audience is technical. If you're looking for a high-level overview, this isn't it. This is the book you read when you need to understand why the Node.js MSI doesn't update your PowerShell session's PATH, why GitHub Desktop uses a "hydration" mechanism instead of a traditional installer, and why running an AI agent under your primary Entra ID is an architectural failure.
This book is designed to work both as a standalone guide and as a companion to the W365Claw repository, which contains the complete Terraform modules, PowerShell scripts, and configuration templates referenced throughout. The repository should be public and current with the code shown in this book at the time of publication.
Several chapters include Mermaid diagrams for architecture and workflow visualization. These render natively in GitHub, VS Code, and most modern markdown viewers. If your reading environment does not support Mermaid, the diagrams are described in the surrounding text.
- Read Part I if you are new to Windows 365 or custom image engineering.
- Jump to Part II and Part III if you already run Windows 365 and need the image pipeline details.
- Use Part IV and Part V as operational runbooks during builds and rollouts.
- Use Part VI when you need to justify, implement, or audit security controls.
- Keep Part VII open as a reference while executing builds.
- Commands appear in fenced code blocks and are intended to be copied as-is.
- Paths are Windows style unless explicitly called out.
- "Build workstation" refers to the temporary VM used for Azure VM Image Builder runs.
- "Agent account" refers to the dedicated Entra ID identity used by the AI agent.
- Code examples are shared with the W365Claw repository and must remain in sync.
- An Azure tenant with Windows 365 licensing and Microsoft Intune.
- Entra ID permissions to create app registrations, managed identities, and groups.
- Subscription-level access (Owner or Contributor) and Intune admin rights for image import and policy changes.
- Ability to create Azure Compute Gallery resources and Azure VM Image Builder templates.
- A trusted build workstation with outbound internet access for installer and npm package downloads.
This guide is accurate as of February 25, 2026. Microsoft services, marketplace images, and third-party tools change frequently. Verify versions, pricing, and feature status in the referenced repositories and release notes before production changes.
-
- Chapter 14: Building the Image
- Chapter 15: Verification Checklist
- Chapter 16: Image Versioning and Staged Rollout
- Chapter 17: Importing into Windows 365
- Chapter 18: The Reprovisioning Reality
- Chapter 19: Tearing Down Build Resources
- Chapter 20: Version Retention and Cost Management
- Chapter 21: CI/CD Pipeline Integration
-
- Chapter 26: The Agent Threat Model
- Chapter 27: Identity Architecture -- The Secondary User Imperative
- Chapter 28: Hardening Claude Code
- Chapter 29: Hardening OpenClaw
- Chapter 30: Network Segmentation
- Chapter 31: Endpoint Protection
- Chapter 32: Intune Configuration Profiles
- Chapter 33: Monitoring and Forensics
