Forum Discussion
Swahlea
Jul 03, 2025Copper Contributor
Bulk Start/Stop of Azure Virtual Desktop Session Hosts in a Host Pool via Single Trigger
Hi Community, We manage an Azure Virtual Desktop (AVD) host pool with a large number of session hosts (e.g., around 100), and we’re looking for a way to start or stop all session hosts in bulk using...
Kidd_Ip
Jul 04, 2025MVP
How about Azre Automation with parallel jobs:
$sessionHosts = Get-AzWvdSessionHost -ResourceGroupName "YourRG" -HostPoolName "YourHostPool"
$jobs = foreach ($host in $sessionHosts) {
Start-Job -ScriptBlock {
param($vmId)
Start-AzVM -ResourceId $vmId
} -ArgumentList $host.ResourceId
}
# Wait for all jobs to complete
$jobs | Wait-Job