Hello @Crispin Flower ,
It looks like you're having trouble with publishing AVD session hosts on your Sponsorship subscription due to the registration token not persisting. Here’s a step-by-step guide to tackle this issue:
Troubleshooting Steps:
Generate a New Registration Key:
- Sign in to the Azure portal.
- Go to Azure Virtual Desktop > Host pools and select your host pool.
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\RDInfraAgent" -Name "RegistrationToken" -Value $newKey -Force
Restart-Service RDAgentBootLoader
```
**Verify the Registration:**
You can check if the session host is registered correctly by running:
```
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\RDInfraAgent" -Name IsRegistered | FL IsRegistered
```Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\RDInfraAgent" -Name RegistrationToken | FL RegistrationToken
```
```powershell
The expected output should show `IsRegistered : 1` and `RegistrationToken : `(which should be blank).
**Check Session Host Status:**
- Go back to the Azure portal and check if the session host now appears as 'Available' within 5-10 minutes.
```### **Follow-Up Questions:**
If the issue persists, it would be helpful to know:
- Are you running into any specific error messages in Event Viewer related to tokens or registration?
- How long have the VMs been deallocated?
- Have there been any recent changes to your network security or firewall settings that might block the necessary endpoints?
### **References:**
- [Troubleshoot common Azure Virtual Desktop Agent issues](https://learn.microsoft.com/troubleshoot/azure/virtual-desktop/troubleshoot-agent)
- [Azure Virtual Desktop session host health checks](https://learn.microsoft.com/azure/virtual-desktop/session-host-status-health-checks)
- [Generate a registration key for a host pool](https://learn.microsoft.com/en-us/azure/virtual-desktop/add-session-hosts-host-pool#generate-a-registration-key)
Hope this helps, and let me know if you need further assistance!
Was this helpful?