Latest AVD host pools challenge – solve it with a simple script

Script for AVD host pools integrated in XOAP
Discover how to tackle the latest AVD pooled host pools challenge using our script in XOAP. Solve it quickly today!
Picture of Ante


In this post, we’re going to introduce you to a simple yet powerful solution: a script made to address the latest AVD pooled host pools challenges. This script is available for every XOAP user, and if you’re not one yet (What are you waiting for? 👀), join our community today and experience the difference firsthand. 

The script is designed to be used with our Scripted Actions feature that supports automation scripts based on PowerShell. But here’s the best part – this script is just one example of Scripted Actions capabilities. You can also (not only):

  • Create Azure Application groups for Azure Host Pools,
  • Create Azure Virtual Desktop Host Pools,
  • Update Azure Virtual Desktop Host Pools,
  • Create Azure Virtual Desktop workspaces, and
  • Delete Azure Image Builder templates and the corresponding Azure Resource groups.

Now let’s tackle what you came here for. 🙌

Problem with AVD pooled host pools?

You might be facing some common problems due to the enforcement of the Preferred App Group Type setting:

  • System slow or unresponsive due to too many users;
  • Users unable to log in;
  • Frequent connection failures;
  • Black screens;
  • Application crashes.
Azure ActionRequired message
Azure ActionRequired message
Our script offers a straightforward fix. By changing the host pool’s Preferred App Group Type, it effectively balances the workload, optimizes logins, improves connection and application stability and prevents black screens.

It updates an Azure Virtual Desktop Host Pool and uses the Azure CLI command.

To proceed with the following, you have to sign up for a FREE TRIAL (we won’t ask for credit card details). This way, you’re able to use our Scripted Actions feature needed to solve your problem. Done? Great, let’s continue.

Start creating a new Scripted Action. In Step 1 out of 3, define the details and add this script from Resources: az-cli-update-avd-hostpool.ps1. Click “Next”. 

Host pool script, Step 1

In Step 2, edit script parameters. Choose your “AzResourceGroupName”, “AzHostPoolName” and “AzTags”.  Then, select the “Desktop” or “RemoteApp” value for the “AzPreferredAppGroupType” parameter.

Host pool script, Step 2

Now you can move on to Step 3 to define a connection. Use the correct connection type based on the script you are using. In case you didn’t add a connection before, just click + to do so. After that, click “Finish”.

Host pool script, Step 3

When you’re done creating a new Scripted Action, you can run it. See how to do that in our Scripted Actions guide. 📝

Depending on the selection, after running the Scripted Action, the Preferred App Group Type for a specific Host Pool (as defined in the “AzHostPoolName” parameter) will be set to either “Desktop” or “RemoteApp.”

Host pool script, Step 4

Share post

More Posts

Scroll to Top