Forum Discussion
No heartbeat from session host and wvd-agent doesn't start on custom image
robm82assuming this is based off the wvd gallery image then you can install the rds powershell module on your problem session host then run these commmands. This assumes only one hostpool in the tenant but if you have multiple you will need to update accordingly.
add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"
$tenant = <tenantname>
$problemhost = <sessionhostname>
$tenant = get-rdstenant $tenant
$hostpool = Get-RdsHostPool $tenant.tenantname
remove-RdsSessionHost -TenantName $tenant.TenantName -HostPoolName $hostpool.HostPoolName -Name $problemhost
New-RdsRegistrationInfo -TenantName $tenant.TenantName -HostPoolName $hostpool.HostPoolName -ExpirationHours 72
$token = Export-RdsRegistrationInfo -TenantName $tenant.TenantName -HostPoolName $hostpool.HostPoolName
cd C:\DeployAgent
.\DeployAgent.ps1 -AgentInstallerFolder .\RDInfraAgentInstall -AgentBootServiceInstallerFolder .\RDAgentBootLoaderInstall -RegistrationToken $token.Token