If I have session host name and resource grup, then how do i find in which hostpool session host is

Mittal Rawat 0 Reputation points
2025-04-01T07:24:25.9933333+00:00

Could you please somewhere interlink hostpool and resource group. so that we know which session host belong to which hostpool, if we only have session host and resource group name. Thanks!

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

1 answer

Sort by: Most helpful
  1. Alex Burlachenko 10,565 Reputation points
    2025-04-01T08:13:56.8033333+00:00

    Hello Mittal Rawat, thank you for posting your question here at Q&A portal.

    Based on your question, you want to determine which Host Pool a Session Host belongs to when you only have the Session Host name and Resource Group. Am I right? If so...

    Using Azure Portal

    1. Navigate to the Azure Portal (https://portal.azure.com)
    2. Go to the Resource Group that contains your Session Host
    3. Find the Virtual Machine (your Session Host) in the resource list
    4. Click on the VM and look at its "Tags" - AVD Session Hosts typically have tags that include the Host Pool information
    5. Alternatively, check the "Extensions" tab - the AVD agent extension often contains Host Pool reference
    # First, get the VM details
    $vm = Get-AzVM -Name <YourSessionHostName> -ResourceGroupName <YourResourceGroupName>
    
    # Check the tags
    $vm.Tags
    
    # Or query the Host Pool directly if the Session Host is registered
    Get-AzWvdSessionHost -HostPoolName <HostPoolName> -ResourceGroupName <HostPoolResourceGroup> | 
        Where-Object {$_.Name -like "*<YourSessionHostName>*"}
    
    
    

    or

    az vm show --name <YourSessionHostName> --resource-group <YourResourceGroupName> --query tags
    
    
    • Session Hosts are typically tagged with their Host Pool information during deployment
    • The Host Pool name is often part of the Session Host's domain join or naming convention
    • If you can't find the information, you may need to check across all Host Pools in your subscription to see where the Session Host is registered

    Links for official MSFT docs https://learn.microsoft.com/en-us/azure/virtual-desktop/manage-session-hosts

    Best regards,

    Alex

    P.S. If my answer help to you, please Accept my answer

    0 comments No comments

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.