What's changed: Created AZ-140 Chapter 2 (Domain 1 second-half: host pool architecture (pooled/personal, breadth/depth load balancing, Windows Enterprise multi-session, RDS CAL/Windows access entitlement, resource organization, VM-capacity design); implementation (Azure portal wizard, registration token, PowerShell/Azure CLI/ARM templates/Bicep IaC, validation-environment flag); session-host images (manual/Sysprep, Azure VM Image Builder, Azure Compute Gallery versioning/replication, update lifecycle/recreate)).
2.2Implementing host pools and session hosts
Understand creating host pools/session hosts in the Azure portal, automating creation with PowerShell/Azure CLI/ARM templates/Bicep, and configuring host pool/session host settings and licensing.
After planning, implement. Use the Azure portal for small validations and code-based automation for repeatable production deployments.
2.2.1Creation and registration
In the Azure portal, a wizard creates the host pool, workspace, application group, and session hosts together. Session hosts (VMs) join the host pool via a registration token (the AVD agent registers with the token). Configure max session limit, load balancing, validation-environment flag, RDP properties (next chapter), and verify licensing (multi-session Windows access entitlement).
2.2.2Automation with IaC
Automate repeatable, large-scale deployments with PowerShell (Az.DesktopVirtualization, etc.), Azure CLI, ARM templates, and Bicep. ARM templates (JSON) and Bicep (its concise DSL) declaratively define host pools/session hosts, enabling reproducible CI/CD deployments. For "avoid manual portal work, make it reproducible in code," choose IaC. Use manual (portal) vs code (IaC) by scale.
Cues: "create a few interactively" = Azure portal wizard. "repeatable, large-scale, reproducible in CI/CD" = IaC (PowerShell/CLI/ARM/Bicep). Session hosts join the host pool via a registration token. Bicep is the concise DSL for ARM templates.
Watch the mix-ups: (1) Registration tokens expire—an expired token blocks session-host join. (2) ARM templates (JSON) and Bicep (DSL) use the same deployment engine—Bicep compiles to ARM. (3) The validation-environment flag receives service updates early—do not set it on production.
2.2.3Section summary
- Portal wizard = few/interactive; IaC (PowerShell/CLI/ARM/Bicep) = repeatable/large-scale/CI-CD reproducible
- Session hosts join the host pool via a registration token (expiring)
- Bicep is the concise DSL for ARM templates (same deployment engine)
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. You want to deploy a production AVD environment declaratively and reproducibly via CI/CD. Which is best?
Q2. What is needed for a session host (VM) to join a host pool?
Q3. A session host cannot register. Regarding the registration token, what is the most likely cause?
Q4. Which correctly relates ARM templates and Bicep?
Q5. You want to quickly create a few session hosts interactively. Which is best?

