Home

Reassigning Personal WVD

%3CLINGO-SUB%20id%3D%22lingo-sub-701395%22%20slang%3D%22en-US%22%3EReassigning%20Personal%20WVD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-701395%22%20slang%3D%22en-US%22%3EI'm%20testing%20out%20the%20personal%20host%20pool%20setup.%20A%20host%20machine%20is%20assigned%20a%20user%20when%20that%20user%20first%20logs%20on%20through%20the%20Remote%20Desktop%20Client.%20This%20works%20as%20expected.%20However%2C%20I%20can't%20figure%20out%20how%20to%20remove%20an%20assigned%20user%20and%20reassign%20that%20host%20machine%20to%20another%20user.%20I've%20tried%20removing%20the%20user%20from%20the%20App%20Group.%20That%20didn't%20work.%20I%20ended%20up%20having%20to%20delete%20the%20host%20machine%20and%20create%20a%20new%20one.%20Is%20there%20a%20way%20to%20reassign%20host%20machines%20in%20a%20personal%20host%20pool%20environment%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-722474%22%20slang%3D%22en-US%22%3ERe%3A%20Reassigning%20Personal%20WVD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-722474%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F357574%22%20target%3D%22_blank%22%3E%40iggyemu%3C%2FA%3E%26nbsp%3BThat's%20a%20very%20nice%20question!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-811540%22%20slang%3D%22en-US%22%3ERe%3A%20Reassigning%20Personal%20WVD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-811540%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F357574%22%20target%3D%22_blank%22%3E%40iggyemu%3C%2FA%3E%26nbsp%3BI'm%20experiencing%20the%20same%20issue.%20Even%20by%20removing%20some%20users%2C%20it%20will%20not%20replace%20them%20with%20the%20new%20one%20I%20added.%20Any%20one%20has%20any%20trick%20for%20not%20having%20to%20add%20a%20new%20VM%20to%20the%20pool%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127538i29EA4320684A2E58%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-811968%22%20slang%3D%22en-US%22%3ERe%3A%20Reassigning%20Personal%20WVD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-811968%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F357574%22%20target%3D%22_blank%22%3E%40iggyemu%3C%2FA%3E%26nbsp%3B%20I%20had%20a%20similar%20ask%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fwindowsvirtualdesktop%2Fremove-rdssessionhost%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fwindowsvirtualdesktop%2Fremove-rdssessionhost%3C%2FA%3E%3C%2FP%3E%3CP%3EFrom%20above%20powershell%20doco%20it%20states%20that%3C%2FP%3E%3CPRE%3EWhen%20running%20this%20command%20to%20remove%20a%20session%20host%20from%20a%20persistent%20host%20pool%2C%20the%20user%20assignment%20is%20also%20removed.%20This%20is%20the%20only%20way%20to%20re-assign%20a%20user%20to%20a%20new%20session%20host%20in%20a%20persistent%20host%20pool.%3C%2FPRE%3E%3CP%3ESo%20the%20best%20I%20was%20able%20to%20achieve%20was%3C%2FP%3E%3CPRE%3ERemove-RdsSessionHost%20-TenantName%20TenantXYZ%20-HostPoolName%20PoolABC%20-Name%20SessionHostToBeRefreshed%3C%2FPRE%3E%3CP%3EGenerate%20a%20new%20token%20for%20the%20session%20pool%20via%3C%2FP%3E%3CPRE%3E%20New-RdsRegistrationInfo%20-TenantName%20TenantXYZ%20-HostPoolName%20PoolABC%20-ExpirationHours%201%3CBR%20%2F%3E%3CBR%20%2F%3E%20(Export-RdsRegistrationInfo%20-TenantName%20TenantXYZ%20-HostPoolName%20PoolABC%20).Token%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELog%20onto%20that%20machine%20and%20remove%20the%20%22Remote%20Desktop%20Services%20Infrastructure%20Agent%22%20%3CEM%3E-%20if%20there%20are%20multiple%20versions%20make%20sure%20to%20remove%20every%20single%20one.%3C%2FEM%3E%3C%2FP%3E%3CP%3EThe%20reinstall%20it%20(there%20should%20be%20a%20copy%20under%20C%3A%5CProgram%20Files%5CMicrosoft%20RDInfra%5CMicrosoft.RDInfra.RDAgent.Installer-x64.msi)%3C%2FP%3E%3CP%3EAnd%20when%20prompted%20use%20the%20token%20that%20you%20generated%20earlier.%3C%2FP%3E%3CP%3EIt%20will%20take%20about%205mins%20for%20the%20session%20host%20to%20rejoin.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20very%20much%20prefer%20a%20powershell%20command%20that%20can%20remove%20assignment%20rather%20than%20uninstalling%20an%20agent!%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-815633%22%20slang%3D%22en-US%22%3ERe%3A%20Reassigning%20Personal%20WVD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815633%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F391300%22%20target%3D%22_blank%22%3E%40soloji%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20research%20and%20insight.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
iggyemu
New Contributor
I'm testing out the personal host pool setup. A host machine is assigned a user when that user first logs on through the Remote Desktop Client. This works as expected. However, I can't figure out how to remove an assigned user and reassign that host machine to another user. I've tried removing the user from the App Group. That didn't work. I ended up having to delete the host machine and create a new one. Is there a way to reassign host machines in a personal host pool environment?
4 Replies

@iggyemu That's a very nice question!

@iggyemu I'm experiencing the same issue. Even by removing some users, it will not replace them with the new one I added. Any one has any trick for not having to add a new VM to the pool?

clipboard_image_0.png

@iggyemu  I had a similar ask

https://docs.microsoft.com/en-us/powershell/module/windowsvirtualdesktop/remove-rdssessionhost

From above powershell doco it states that

When running this command to remove a session host from a persistent host pool, the user assignment is also removed. This is the only way to re-assign a user to a new session host in a persistent host pool.

So the best I was able to achieve was

Remove-RdsSessionHost -TenantName TenantXYZ -HostPoolName PoolABC -Name SessionHostToBeRefreshed

Generate a new token for the session pool via

 New-RdsRegistrationInfo -TenantName TenantXYZ -HostPoolName PoolABC -ExpirationHours 1

(Export-RdsRegistrationInfo -TenantName TenantXYZ -HostPoolName PoolABC ).Token

 

Log onto that machine and remove the "Remote Desktop Services Infrastructure Agent" - if there are multiple versions make sure to remove every single one.

The reinstall it (there should be a copy under C:\Program Files\Microsoft RDInfra\Microsoft.RDInfra.RDAgent.Installer-x64.msi)

And when prompted use the token that you generated earlier.

It will take about 5mins for the session host to rejoin.

 

 

I would very much prefer a powershell command that can remove assignment rather than uninstalling an agent!

 

 

 

@soloji

 

Thanks for the research and insight. 

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies