Azure Virtual Desktop Hostpool properties problem

YONG-SHENG SHIH 5 Reputation points
2024-08-14T08:37:22.8866667+00:00

As the owner of the subscription, I tried to update the value of the Validation Environment to false, but the "Save" button in the Azure portal was disabled. When I attempted to use Azure CLI, I encountered an error stating that the -n parameter was invalid because the host pool name length was less than 3 characters. Finally, I was able to make the changes using the PowerShell module.

Why can't the update be made directly in the portal, and why do PowerShell and CLI produce different results? I referred to this official document.

https://learn.microsoft.com/en-us/azure/virtual-desktop/configure-validation-environment?WT.mc_id=Portal-Microsoft_Azure_WVD&tabs=azure-portal

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,834 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anusree Nashetty 4,375 Reputation points Microsoft External Staff Moderator
    2024-08-23T07:31:05.4366667+00:00

    Hi Stanley Shih,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    I tried again in my labs, it is working with CLI script. You can update the Validation Environment Variable to false with the below CLI script. Please follow the steps.

    Create a Resource Group

    az group create --name RG-DEMO-WE --location westus

    Deploy a Host pool

    $resourceGroupName="RG-DEMO-WE"

    $location="westus"

    $hostPoolName="HP"

    New-AzWvdHostPool `

    -ResourceGroupName $resourceGroupName `
    
    -Name $hostPoolName `
    
    -HostPoolType 'Pooled' `
    
    -LoadBalancerType 'BreadthFirst' `
    
    -Location $location `
    
    -PreferredAppGroupType 'Desktop' `
    
    -Description "My AVD host pool" `
    
    -FriendlyName "AVD DEMO" `
    
    -StartVMOnConnect:$true `
    
    -ValidationEnvironment:$false `
    
    -MaxSessionLimit '10' `
    

    Here is the created Host pool!

    User's image Hope this helps! If you have any further queries, please do let us know.

    If the answer is helpful, please click "Accept Answer" and "Upvote it."


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.