Remote Desktop Services with High Availability

Last updated: 17/06/2020

This ARM Template sample code will deploy a **Remote Desktop Services 2019 Session Collection** lab with high availability. The goal is to deploy a fully redundant, highly available solution for Remote Desktop Services, using Windows Server 2019.

This Azure Resource Manager (ARM) template was created by a member of the community and not by Microsoft. Each ARM template is licensed to you under a licence agreement by its owner, not Microsoft. Microsoft is not responsible for ARM templates provided and licensed by community members and does not screen for security, compatibility or performance. Community ARM templates are not supported under any Microsoft support programme or service, and are made available AS IS without warranty of any kind.


Parameter Name Description
projectName Define the project name or prefix for all objects.
adminUser What is the username for the admin on VMs and SQL Server?
adminPasswd What is the password for the admin on VMs and SQL Server?
location The location for resources on template. By default, the same as resource group location.
timeZoneID TimeZone ID to be used on VMs. Get available timezones with powershell Get-TimeZone command.
externalDnsZone External public DNS domain zone. NOT AD domain. This the external domain your certs will point to.
deployHA This will trigger certificate request and HA deployment. If set to false, will not create HA deployment nor request certificates.
dcCount How many Domain Controllers would you like to deploy?
rdcbCount How many RD Connection Brokers would you like to deploy?
rdwgCount How many RD Web Access/Gateways would you like to deploy?
rdshCount How many RD Session Hosts would you like to deploy?
lsfsCount How many License/File Servers would you like to deploy?
vmSize What is the VM size for all VMs?
vmSpot Create Azure Spot VMs?
vmStorageSkuType What is the SKU for the storage to VM managed disks?
adDomainName What is the new forest/root Active Directory domain name?
vNetPrefix What is the prefix for the vnet and first subnet?
vNetAddressSpace What is the vnet address space?
vNetSubnetAddress What is the subnet address prefix?
_artifactsLocation Location of all scripts and DSC resources for RDS deployment.
_artifactsLocationSasToken SAS storage token to access _artifactsLocation. No need to change unless you copy or fork this template.

Use the template


New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri
Installing and configuring Azure PowerShell

Command line

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri
Installing and configuring the Azure cross-platform command-line interface