How do I get that machine back in the session host list?

%3CLINGO-SUB%20id%3D%22lingo-sub-1284725%22%20slang%3D%22en-US%22%3EHow%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1284725%22%20slang%3D%22en-US%22%3EHi%2C%20I%20had%2020%20machines%20in%20hostpool.%20I%20executed%20the%20below%20command%20Remove-RdsSessionhost%20-TenantName%20%22test%22%20-HostPoolName%20%22testpool%22%20-Name%20%22test15.xyz.com%22%20Now%20when%20I%20do%20get-rdssessionhost%2C%20it%20gives%20me%20the%20list%20of%2019%20machines%20(test15%20not%20in%20the%20list)%20When%20I%20try%20to%20do%20Set-rdssessionhost%20and%20assign%20it%20to%20any%20user%2C%20i%20get%20error%20saying%20the%20machine%20is%20not%20the%20part%20of%20hostpool.%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%20Please%20help!%20Regards%2C%20Yash%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1285550%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1285550%22%20slang%3D%22en-US%22%3Eyou%20will%20need%20to%20re-register%20the%20session%20host%20to%20your%20hostpool.%20You%20can%20follow%20the%20hostpool%20registration%20step%20in%20the%20following%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fcreate-host-pools-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fcreate-host-pools-powershell%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1286646%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1286646%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F181812%22%20target%3D%22_blank%22%3E%40Soo%20Kuan%20Teo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20response.%3C%2FP%3E%3CP%3EI%20tried%20to%20follow%20the%20steps%2C%20however%2C%20while%20installing%20Windows%20Virtual%20Desktop%20Agent%2C%20it%20didn't%20asked%20me%20for%20registration%20token.%20Installation%20got%20completed%20for%20both%26nbsp%3BWindows%20Virtual%20Desktop%20Agent%20and%26nbsp%3BWindows%20Virtual%20Desktop%20Agent%20Bootloader.%20I%20still%20do%20not%20see%20the%20host%20in%20Get-RdsSessionHost%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1289782%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1289782%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F459754%22%20target%3D%22_blank%22%3E%40yashsedani%3C%2FA%3E%2C%3C%2FP%3E%3CP%3Eplease%20goto%20control%20panel%2C%20uninstall%20the%20agent%2C%20then%20reinstall%20the%20agent%20again.%20You%20should%20see%20the%20attached%20screenshot%20where%20you%20can%20input%20the%20registration%20token.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1302386%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1302386%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F181812%22%20target%3D%22_blank%22%3E%40Soo%20Kuan%20Teo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20installing%20both%20Agent%20and%20BootLoader%20again%20with%20provided%20the%20valid%20token%20while%20installing%20agent%2C%20still%20it%20didn't%20helped.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1303190%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1303190%22%20slang%3D%22en-US%22%3ECan%20you%20please%20check%20the%20regkey%20HKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CRDInfraAgent%2C%20IsRegistered%20should%20be%201%2C%20and%20RegistrationToken%20should%20be%20empty.%20Also%20please%20look%20at%20event%20log%20application%20to%20see%20there%20are%20any%20error%20messages%20from%20RDAgentBootLoader.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1303863%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1303863%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F181812%22%20target%3D%22_blank%22%3E%40Soo%20Kuan%20Teo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20was%20no%20IsRegistered%20key%20so%20i%20added%201%20DWORD-32%20and%20changed%20value%20to%201%2C%20RegisterationInfo%20was%20showing%20the%20old%20Token%20ID%2C%20i%20kept%20it%20blank%20now.%20I%20tried%20reinstalling%20agent%20with%20new%20token%20(as%20the%20earlier%20one%20was%20expired)%20but%20still%20it%20wont%20show%20up%20in%20session%20host%20list.%3C%2FP%3E%3CP%3EThere%20are%203%20repeat%20events%20errors%20for%20RDAgentBootLoader%2C%20refer%201%2C2%2C3%20in%20the%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1307267%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1307267%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F459754%22%20target%3D%22_blank%22%3E%40yashsedani%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20info!%20the%20agent%20is%20not%20registering%20correctly.%20It%20is%20very%20possible%20that%20the%20downloaded%20agent%20package%20is%20corrupted.%20Here's%20the%20detailed%20instruction%20to%20recover%3A%3C%2FP%3E%3CP%3E1.%20Go%20to%20control%20panel%2C%20uninstall%20bootloader%20first%20then%20uninstall%20the%20agent.%20See%20attached%20uninstall.png%3C%2FP%3E%3CP%3E2.%20Under%26nbsp%3BHKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CRDAgentBootLoader%20and%20HKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5CRDInfraAgent%20keys%2C%20make%20sure%20these%20keys%20for%20gone.%20See%20attached%20regkey.png.%3C%2FP%3E%3CP%3E3.%20Download%20both%20the%20bootloader%20and%20agent%20from%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fcreate-host-pools-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-desktop%2Fcreate-host-pools-powershell%3C%2FA%3E%3C%2FP%3E%3CP%3E4.%20have%20the%20new%20or%20unexpired%20registration%20token%20ready%3C%2FP%3E%3CP%3E5.%20Install%20the%20agent%20first%20with%20the%20valid%20token%3C%2FP%3E%3CP%3E6.%20install%20the%20bootloader%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1313469%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313469%22%20slang%3D%22en-US%22%3EDo%20you%20see%20any%20new%20event%20logs%20from%20agent%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1310079%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20that%20machine%20back%20in%20the%20session%20host%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1310079%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F181812%22%20target%3D%22_blank%22%3E%40Soo%20Kuan%20Teo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20uninstalling%20both%20Agent%20and%20Bootloader%2C%20there%20is%20no%20registry%20for%20both.%20When%20i%20reinstall%2C%20it%20takes%20the%20old%20token%20(when%20machine%20was%20first%20created)%20from%20somewhere%20and%20there%20is%20no%20IsRegistered%20key%20(same%20as%20before)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor
Hi, I had 20 machines in hostpool. I executed the below command Remove-RdsSessionhost -TenantName "test" -HostPoolName "testpool" -Name "test15.xyz.com" Now when I do get-rdssessionhost, it gives me the list of 19 machines (test15 not in the list) When I try to do Set-rdssessionhost and assign it to any user, i get error saying the machine is not the part of hostpool. How do I get that machine back in the session host list? Please help! Regards, Yash
11 Replies
Highlighted
you will need to re-register the session host to your hostpool. You can follow the hostpool registration step in the following:
https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell
Highlighted

@Soo Kuan Teo 

Thanks for your response.

I tried to follow the steps, however, while installing Windows Virtual Desktop Agent, it didn't asked me for registration token. Installation got completed for both Windows Virtual Desktop Agent and Windows Virtual Desktop Agent Bootloader. I still do not see the host in Get-RdsSessionHost

 

Highlighted

@yashsedani,

please goto control panel, uninstall the agent, then reinstall the agent again. You should see the attached screenshot where you can input the registration token.

 

Highlighted

@Soo Kuan Teo 

I tried installing both Agent and BootLoader again with provided the valid token while installing agent, still it didn't helped.

Highlighted
Can you please check the regkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent, IsRegistered should be 1, and RegistrationToken should be empty. Also please look at event log application to see there are any error messages from RDAgentBootLoader.
Highlighted

@Soo Kuan Teo 

There was no IsRegistered key so i added 1 DWORD-32 and changed value to 1, RegisterationInfo was showing the old Token ID, i kept it blank now. I tried reinstalling agent with new token (as the earlier one was expired) but still it wont show up in session host list.

There are 3 repeat events errors for RDAgentBootLoader, refer 1,2,3 in the attached.

Highlighted

@yashsedani 

Thanks for the info! the agent is not registering correctly. It is very possible that the downloaded agent package is corrupted. Here's the detailed instruction to recover:

1. Go to control panel, uninstall bootloader first then uninstall the agent. See attached uninstall.png

2. Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDAgentBootLoader and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent keys, make sure these keys for gone. See attached regkey.png.

3. Download both the bootloader and agent from: https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell

4. have the new or unexpired registration token ready

5. Install the agent first with the valid token

6. install the bootloader

 

 

 

 

 

Highlighted

@Soo Kuan Teo 

After uninstalling both Agent and Bootloader, there is no registry for both. When i reinstall, it takes the old token (when machine was first created) from somewhere and there is no IsRegistered key (same as before)

Highlighted
Do you see any new event logs from agent?
Highlighted

@Soo Kuan Teo

I see same Error Events logs. 

Highlighted
Can you please check other event logs from the agent? the event log you provided is from the bootloader which is good that it is working as expected. It will give more hint what fail from the agent event logs. From the build 1288, the source should be "WVD-Agent", or "Transport", or something similar. Thanks for your patience.