Pooled Host Pool Creation Using PowerShell/CLI and ARM – Create and Configure Host Pools and Session Hosts

Pooled Host Pool Creation Using PowerShell/CLI and ARM

Pooled desktop is different then personal desktop and thats why you need additional detail for automation/script to create pooled hostpool. Since everything is possible with automation, we can use PowerShell and ARM in such a way that they can create pooled as well as personal desktops, and you must make sure you are passing the correct parameter required for the pooled desktop using the same PowerShell and ARM versions mentioned in earlier section (section – personal Host Pool Creation Using PowerShell/CLI and ARM).

Here are the parameters required for a pooled desktop:

•\    $HostpoolType must set to pooled as follows so that the script will create the pooled host pool:$HostpoolType = “pooled”

•\    $loadBalancerType can be BreadthFirst or DepthFirst for a pooled host pool. Change the value in the script param as shown here: $loadBalancerType = “BreadthFirst”

•\   The $MaxSessionLimit parameter is required only for pooled host pools, and it will define the number of concurrent sessions per VM/ session hosts on the pooled host pool. Make sure you are changing values before triggering PowerShell and ARM. See Figure 8-18.

$MaxSessionLimit=4

Figure 8-18.  Azure Virtual Desktop creation via PowerShell plus ARM

Follow the same steps mentioned here for the personal host pool creation and create a pooled host pool just by changing the host pool type, load balancing type, and the max session limit parameter in the PowerShell mentioned in the previous section.