Forum Discussion
robm82
Aug 21, 2019Copper Contributor
No heartbeat from session host and wvd-agent doesn't start on custom image
I have attempted to create my own custom image to use with WVD, and I have installed all the pre-reqs as stated in this article in terms of installing the Windows Virtual Desktop agent: https://w...
Michael Eckerle
Apr 13, 2020Copper Contributor
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