πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided AZ-140 Domain 4
Domain 4 β€” Module 2 of 4 50%
26 of 28 overall

AZ-140 Study Guide

Domain 1: Plan and Implement an AVD Infrastructure

  • AVD Architecture: The Big Picture Free
  • Network Capacity and Design Free
  • RDP Shortpath, Multipath and QoS Free
  • Private Link and Network Troubleshooting Free
  • Storage Planning for User Data Free
  • File Shares and Azure NetApp Files Free
  • Host Pool Architecture: Personal vs Pooled Free
  • Sizing for Performance and Capacity Free
  • Creating Host Pools and Session Hosts Free
  • Session Host Licensing Free
  • Building Session Host Images Free
  • Image Lifecycle and Compute Gallery Free

Domain 2: Plan and Implement Identity and Security

  • Identity Scenarios for AVD
  • RBAC, Conditional Access and SSO
  • Defending AVD with Microsoft Defender
  • Network Security: NSGs, Firewall, Bastion
  • Threat Protection and Confidential VMs

Domain 3: Plan and Implement User Environments and Apps

  • FSLogix Profile Containers and ODFC
  • FSLogix Cloud Cache and Application Masking
  • AVD Clients: Choose and Deploy
  • User Experience and Session Settings
  • Application Groups and RemoteApp
  • Microsoft 365, Teams and OneDrive on AVD
  • App Attach: Dynamic Application Delivery

Domain 4: Monitor and Maintain an AVD Infrastructure

  • Monitoring AVD with Azure Monitor
  • Autoscaling and Session Management
  • Update Strategy and Backups
  • Disaster Recovery and Multi-Region

AZ-140 Study Guide

Domain 1: Plan and Implement an AVD Infrastructure

  • AVD Architecture: The Big Picture Free
  • Network Capacity and Design Free
  • RDP Shortpath, Multipath and QoS Free
  • Private Link and Network Troubleshooting Free
  • Storage Planning for User Data Free
  • File Shares and Azure NetApp Files Free
  • Host Pool Architecture: Personal vs Pooled Free
  • Sizing for Performance and Capacity Free
  • Creating Host Pools and Session Hosts Free
  • Session Host Licensing Free
  • Building Session Host Images Free
  • Image Lifecycle and Compute Gallery Free

Domain 2: Plan and Implement Identity and Security

  • Identity Scenarios for AVD
  • RBAC, Conditional Access and SSO
  • Defending AVD with Microsoft Defender
  • Network Security: NSGs, Firewall, Bastion
  • Threat Protection and Confidential VMs

Domain 3: Plan and Implement User Environments and Apps

  • FSLogix Profile Containers and ODFC
  • FSLogix Cloud Cache and Application Masking
  • AVD Clients: Choose and Deploy
  • User Experience and Session Settings
  • Application Groups and RemoteApp
  • Microsoft 365, Teams and OneDrive on AVD
  • App Attach: Dynamic Application Delivery

Domain 4: Monitor and Maintain an AVD Infrastructure

  • Monitoring AVD with Azure Monitor
  • Autoscaling and Session Management
  • Update Strategy and Backups
  • Disaster Recovery and Multi-Region
Domain 4: Monitor and Maintain an AVD Infrastructure Premium ⏱ ~10 min read

Autoscaling and Session Management

Implement autoscaling in host pools, manage active sessions and application groups, and configure Start VM on Connect for Azure Virtual Desktop.

Autoscaling and Session Management

Running all your session hosts 24/7 is like leaving every light in the building on overnight β€” it works, but it wastes money. Autoscaling lets AVD start VMs when users need them and shut them down when they don’t. Combined with session management tools, you get full control over who is connected, where, and how much compute you are paying for.

β˜• Simple explanation

Why Autoscaling Matters

Without autoscaling, you have two bad choices:

  1. Keep all VMs running β€” reliable, but you pay for idle compute during nights and weekends
  2. Manually start/stop VMs β€” saves money, but someone has to remember, and users get angry if their VM is not ready

Autoscaling eliminates this trade-off. Microsoft estimates it can reduce VM costs by 30 to 60 percent compared to always-on hosts, depending on your usage patterns.


Scaling Plans β€” The Four Phases

A scaling plan divides each day into four time phases. Each phase has its own rules:

PhaseTypical hoursWhat happensRecommended load balancing
Ramp-up7:00 AM - 9:00 AMGradually start hosts before users arriveBreadth-first (spread users across hosts)
Peak hours9:00 AM - 5:00 PMAll needed hosts running, full capacityBreadth-first or depth-first
Ramp-down5:00 PM - 7:00 PMGradually shut down hosts as users leaveDepth-first (consolidate onto fewer hosts)
Off-peak7:00 PM - 7:00 AMMinimum hosts runningDepth-first

Key Settings Per Phase

  • Minimum percentage of hosts β€” The floor. Even if nobody is connected, keep at least this percentage running. Set to 10-20 percent during off-peak so a few early birds can connect immediately.
  • Capacity threshold β€” When the percentage of used sessions across running hosts exceeds this number, start more hosts. Example: threshold of 75 percent means β€œstart a new host when current hosts are 75 percent full.”
  • Force logoff β€” During ramp-down, if a host needs to shut down but still has users, should AVD force them off? You set a delay (e.g., 15 minutes warning) and a message they see.

🏒 Raj’s multi-timezone challenge: TerraStack has offices in Sydney, London, and Toronto. Raj creates three scaling plans β€” one per region β€” each aligned to local business hours. The Sydney plan ramps up at 7 AM AEST while London is still in off-peak. He assigns each plan to the appropriate host pool. Andrea loves the cost report: compute spend dropped 42 percent in the first month.

Exam Tip β€” Breadth-First vs Depth-First for Scaling

The exam frequently tests this. During ramp-up and peak, use breadth-first β€” spread users across many hosts so no single host gets overwhelmed. During ramp-down and off-peak, switch to depth-first β€” pack users onto fewer hosts so empty hosts can be deallocated. This is the cost-optimal pattern.


Configuring a Scaling Plan

To create a scaling plan in the Azure portal:

  1. Navigate to Azure Virtual Desktop then Scaling plans
  2. Click Create a scaling plan
  3. Select the subscription, resource group, and give it a name
  4. Set the time zone (critical for multi-region)
  5. Add schedules for each day of the week (you can use one schedule for weekdays and another for weekends)
  6. Configure each phase with its start time, load balancing, minimum hosts, and capacity threshold
  7. Assign the plan to one or more host pools
  8. Set the plan to Enabled

Important: the scaling plan needs the Desktop Virtualization Power On Off Contributor role on the subscription or resource group containing the VMs. Without this RBAC assignment, the plan cannot start or stop hosts.

Deep Dive β€” Scaling Plan Evaluation Logic

The scaling plan evaluates every 15 minutes. It checks: (1) What phase are we in? (2) How many hosts are running? (3) What is the current session load vs capacity threshold? (4) Do we need to start or stop hosts?

When starting hosts, it picks deallocated VMs and starts them. When stopping hosts, it picks hosts with zero sessions first. If all hosts have sessions and the plan needs to reduce capacity, it puts hosts in drain mode (no new sessions) and optionally force-logs-off users after the configured delay.


Start VM on Connect

Start VM on Connect solves a different problem: personal host pools where each user has a dedicated VM.

With personal pools, you cannot use traditional autoscaling because each user needs their specific VM. Start VM on Connect works like this:

  1. User opens the Remote Desktop client and clicks their desktop
  2. AVD detects the VM is deallocated
  3. AVD starts the VM automatically
  4. User waits 1-2 minutes while the VM boots
  5. Connection completes

This means personal VMs can be deallocated when not in use, saving compute costs, without requiring users to manually start their VM or wait for an admin.

How to Enable It

  1. Go to the host pool properties
  2. Set Start VM on Connect to Yes
  3. Assign the Desktop Virtualization Power On Contributor role to the AVD service principal on the subscription or resource group

🌐 Priya’s cost win: NomadTech’s 200 remote workers each have a personal desktop. Before Start VM on Connect, all 200 VMs ran 24/7 β€” even though most people work 8-hour days across different time zones. After enabling the feature, VMs only run when someone actually connects. Combined with auto-shutdown after 2 hours of inactivity, Priya reduced compute costs by 55 percent. Ben (creative director) barely noticed β€” his VM takes about 90 seconds to start when he clicks his desktop.


Autoscaling vs Start VM on Connect

FeatureAutoscaling (Scaling Plans)Start VM on Connect
Best forPooled host poolsPersonal host pools
How it worksStarts/stops hosts based on schedule and demandStarts a specific VM when a user connects
TriggerTime schedule + capacity thresholdUser connection attempt
Load balancingBreadth-first or depth-first per phaseNot applicable (user has assigned VM)
User experienceHosts already running β€” instant connection1-2 minute wait while VM boots
Cost savings30-60 percent typically40-70 percent for personal pools
ConfigurationScaling plan with 4 phasesSingle toggle on host pool
RBAC requiredPower On Off ContributorPower On Contributor
Can be combined?Yes β€” scaling plan handles pooled pools alongsideYes β€” can coexist with scaling plans

Managing Active Sessions

As an AVD admin, you need to manage users who are currently connected. The Azure portal gives you these tools under each host pool’s Session hosts blade:

  • View active sessions β€” See every connected user, their session host, login time, and session state
  • Send a message β€” Push a notification to a user’s session (e.g., β€œMaintenance in 15 minutes, please save your work”)
  • Disconnect β€” End the RDP connection but keep the session alive on the host (user can reconnect and resume)
  • Log off β€” End the session completely, closing all apps
  • Drain mode β€” Prevent NEW connections to a specific host while existing sessions continue

Drain Mode

Drain mode is essential for maintenance. When you turn on drain mode for a session host:

  • No new users will be assigned to that host
  • Existing users remain connected and can keep working
  • When the last user logs off, the host is empty and safe to update or restart

🎧 Mia’s maintenance window: Mia needs to update the antivirus agent on session hosts at Horizons Health. She cannot just reboot them β€” nurses are charting during all hours. She enables drain mode on hosts one at a time, waits for users to naturally log off (or sends a friendly message), patches the host, disables drain mode, and moves to the next. Zero downtime for the clinic.


Application Group Monitoring

Application groups control which desktops and apps users can access. From the portal, you can:

  • See which application groups are assigned to which users or groups
  • Check the number of active connections per application group
  • Identify unused application groups (candidates for cleanup)
  • Review which RemoteApps are published and their paths

This data also flows into AVD Insights if diagnostics are enabled, letting you track usage trends over time.

Exam Tip β€” Drain Mode vs Deallocate vs Delete

Know the difference. Drain mode keeps the VM running but blocks new sessions β€” use for maintenance. Deallocate stops the VM to save compute costs β€” the VM still exists and can be started. Delete removes the VM entirely β€” you lose the OS disk unless it is backed up. The exam may describe a scenario and ask which action to take.


Flashcards

Question

What are the four phases of an AVD scaling plan?

Click or press Enter to reveal answer

Answer

1. Ramp-up β€” gradually start hosts before peak. 2. Peak hours β€” full capacity. 3. Ramp-down β€” gradually stop hosts as demand drops. 4. Off-peak β€” minimum hosts running. Each phase has its own load-balancing algorithm, minimum host percentage, and capacity threshold.

Click to flip back

Question

What RBAC role does a scaling plan need to start and stop VMs?

Click or press Enter to reveal answer

Answer

Desktop Virtualization Power On Off Contributor. This role must be assigned on the subscription or resource group containing the session host VMs. Without it, the scaling plan has no permission to change VM power state.

Click to flip back

Question

What is Start VM on Connect and which host pool type uses it?

Click or press Enter to reveal answer

Answer

Start VM on Connect automatically starts a deallocated VM when a user tries to connect to it. It is designed for personal host pools where each user has a dedicated VM. The user waits 1-2 minutes for the VM to boot, then their connection completes.

Click to flip back

Question

What does drain mode do on a session host?

Click or press Enter to reveal answer

Answer

Drain mode prevents new user sessions from being assigned to that host, but existing sessions continue uninterrupted. It is used for maintenance β€” you drain the host, wait for users to finish, then safely patch or reboot it.

Click to flip back


Knowledge Check

Knowledge Check

Priya wants to reduce costs for NomadTech's personal desktop pool. Users work across 12 time zones and there is no predictable peak hour. Which feature should she enable?

Knowledge Check

Raj's scaling plan is configured with a capacity threshold of 75 percent during peak hours. The host pool has 10 VMs, each with a max session limit of 10. Currently 6 VMs are running with a total of 48 active sessions. What will happen at the next evaluation?

Knowledge Check

Which load-balancing algorithm should be used during the ramp-down phase and why?


Summary

Autoscaling and session management are how you balance cost and user experience. Use scaling plans for pooled host pools (four-phase schedule with capacity thresholds), Start VM on Connect for personal pools, and drain mode for safe maintenance. Get the load-balancing strategy right β€” breadth-first when ramping up, depth-first when winding down.

Next up: VMs do not patch themselves β€” Update Strategy and Backups.

🎬 Video coming soon

Autoscaling and Session Management

← Previous

Monitoring AVD with Azure Monitor

Next β†’

Update Strategy and Backups

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.