Microsoft AZ-140: Session Host Operations, Scaling and Optimization — Study Guide

Part of the Microsoft Azure Virtual Desktop Specialty AZ-140 — Study Guide. Practice with verified answers in the Microsoft exam hub, or take timed practice tests on ExamRoll.io.

Overview

Session host operations in Azure Virtual Desktop (AVD) center on three core disciplines: right-sizing and performance engineering, intelligent scale and power management, and reliable day-2 operations. The goal is to deliver consistent user experience during peak demand while minimizing spend during off-hours, all without compromising maintainability or recoverability. This section explains how to design and operate AVD autoscale with scaling plans, schedule and capacity configuration, operational states such as drain mode, and health and registration troubleshooting. It then ties sizing guidance (including GPU-enabled workloads) and automation together with cost optimization levers such as reservations, savings plans, and Azure Hybrid Benefit.

Autoscale Design: Scaling Plans, Schedules, and Host-Pool Targeting

Operational State, Maintenance, and Health: Drain Mode, Notifications, and Registration

# Put a session host in drain mode (no new sessions)
Update-AzWvdSessionHost -ResourceGroupName rg-avd -HostPoolName hp-finance `
  -Name host1.contoso.com -AllowNewSession:$false

# Gracefully logoff idle users after notice (example)
Invoke-AzVMRunCommand -ResourceGroupName rg-avd -Name host1 `
  -CommandId RunPowerShellScript -ScriptPath .\Notify-And-Logoff.ps1

Sizing, Utilization, and GPU-Enabled Workloads

Cost Optimization: Power, Autoscale, Reservations, Savings Plans, and AHB

# Start or stop idle hosts by tag (supplemental to native autoscale)
$hosts = Get-AzWvdSessionHost -ResourceGroupName rg-avd -HostPoolName hp-ops
foreach ($h in $hosts) {
  if ($h.Session -eq 0 -and $h.Tags["KeepOnline"] -ne "true") {
    Stop-AzVM -ResourceGroupName rg-avd -Name ($h.Name.Split("/")[1]) -Force -StayProvisioned:$false
  }
}

Practical Problem Scenario

IKEA faces weekday spikes from 3D planners, product engineers, and call-center staff using remote apps. Evenings and weekends are low demand. GPU-backed sessions must remain responsive while minimizing overall compute cost.

  1. Segment host pools by workload

    • Create three pooled host pools: GPU-CAD (NVads A10 v5), KnowledgeWorker (D/E-series), and ContactCenter (D-series).
    • Why: Aligns VM size and density with distinct performance profiles; enables independent autoscale and maintenance windows.
  2. Attach a single scaling plan with schedules per business hours

    • Define ramp-up at 07:00, peak 09:00–17:00, ramp-down 17:00–19:00, off-peak otherwise; set time zone to the region of each pool.
    • Why: Guarantees capacity is ready before users arrive, consolidates and powers down gracefully after hours, and honors regional times.
  3. Tune capacity thresholds and minimum host availability per pool

    • GPU-CAD: breadth-first, capacity threshold 70%, minimum hosts 30% online; KnowledgeWorker: depth-first, threshold 65%, minimum 10%; ContactCenter: depth-first, threshold 70%, minimum 15%.
    • Why: GPU workloads prefer broader spread for responsiveness; office workloads gain from consolidation to cut cost; call center requires steady reserve for shift changes.
  4. Enable Start VM on connect for KnowledgeWorker and ContactCenter

    • Grant host pool managed identity VM Start permissions; keep off-peak minimum low.
    • Why: Reduces idle runtime charges while preserving just-in-time access for unexpected after-hours logons.
  5. Implement maintenance and notification workflow

    • Before Patch Tuesday: place 20% of each pool in drain mode via tag; notify users 30 minutes prior; after idle, patch, reboot, validate agent/heartbeat, then rotate to next batch.
    • Why: Rolling drain avoids mass logoffs, preserves service continuity, and reduces helpdesk spikes.
  6. Monitor and iterate with Azure Monitor for AVD

    • Track CPU, memory, GPU utilization, logon duration, FSLogix latency; adjust MaxSessionLimit and autoscale thresholds monthly.
    • Why: Data-driven tuning maintains SLA and controls spend as usage patterns evolve.
  7. Apply cost levers

    • Reserve 3-year capacity for baseline weekday peak in KnowledgeWorker and ContactCenter; use a Compute Savings Plan for variable GPU demand; apply Azure Hybrid Benefit where eligible.
    • Why: Reservations lock in biggest savings for predictable base load; savings plans flex with less predictable GPU peaks; AHB lowers OS licensing costs.
  8. Harden registration and health

    • Maintain a standing runbook to re-register any host that shows NoHeartbeat, and validate DNS/time. Keep exclusion tags for diagnostic hosts.
    • Why: Swift, automated remediation limits user impact and preserves capacity during unexpected agent issues.

With this design, IKEA meets daytime performance objectives—including GPU responsiveness—while aggressively deallocating off-hours capacity and automating maintenance, resulting in a stable user experience and measurable cost reduction.


FSLogix · All domains · Applications and End-User Experience

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Microsoft →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product