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
- Navigate to the Azure Portal (https://portal.azure.com)
- Go to the Resource Group that contains your Session Host
- Find the Virtual Machine (your Session Host) in the resource list
- Click on the VM and look at its "Tags" - AVD Session Hosts typically have tags that include the Host Pool information
- 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