Forum Discussion
Reassigning Personal WVD
8 Replies
- Kesavan MunuswamyCopper Contributor
Did you tried WVD Spring 2020 , anyone know in WVD spring 2020 the same feature is introduced or not , currently we are also facing same issue , In personal pool once user is assigned to session host we could not able to assign the instance some once in cause of existing user resigned the organization.
thanks in advance.
- solojiCopper Contributor
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 ).TokenLog 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!
- raoliveira91Copper Contributor
iggyemu That's a very nice question!