Thanks for posting your question in the Microsoft Q&A forum.
You have several options:
PowerShell Script:
# Connect to Azure (if not already connected)
Connect-AzAccount
# Get all host pools
$hostPools = Get-AzWvdHostPool
# Initialize an array to store results
$results = @()
foreach ($hostPool in $hostPools) {
$sessionHosts = Get-AzWvdSessionHost -HostPoolName $hostPool.Name -ResourceGroupName $hostPool.ResourceGroupName
foreach ($sessionHost in $sessionHosts) {
$results += [PSCustomObject]@{
HostPoolName = $hostPool.Name
SessionHostName = $sessionHost.Name.Split('/')[-1]
LastHeartbeat = $sessionHost.LastHeartBeat
Status = $sessionHost.Status
}
}
}
# Export results to CSV
$results | Export-Csv -Path "SessionHostHeartbeats.csv" -NoTypeInformation
Azure CLI:
You can use the Azure CLI to retrieve similar information.
Azure Portal:
You can view the Last heartbeat time for session hosts, in Azure Virtual Desktop blade select Host pools
for specific host pool go to the Session hosts
tab
Azure Resource Graph:
You can use Azure Resource Graph to query this information.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful