Windows Virtual Desktop – How to Re-assign a Personal Desktop

I recently had the requirement to re-assign a WVD personal desktop to another user. Looking into this, I found that this functionality isn’t available in the Azure Portal as yet. You can assign users to a personal desktop, but once assigned there is no option to remove the assignment or change it to another user. It can still be done however! The following steps detail how.

First of all, ensure you know the registration key for your host pool, or generate a new registration key using the portal, or PowerShell.

Select the host you wish to re-assign. Ensure there are no active user sessions before proceeding. When ready, click the Remove button. You will get a message to say that this will remove the WVD Session Host, however it will not delete the virtual machine itself:

Click Remove to confirm. Now the session host will no longer be listed in the host pool.

The next step is to change two registry keys on the former session host virtual machine. To do so you could RDP to the VM, or you could make the change remotely.

Both keys that need to be changed can be found here:

 HKLM\Software\Microsoft\RDInfraAgent  

First of all, edit the RegistrationToken key, and paste your host pool registration token into the key value. Next, edit the value of the IsRegistered key. It is likely currently set to ‘1’. Change the value to ‘0’.

Next, reboot the virtual machine. Once it restarts you should see it registered as a session host in the Windows Virtual Desktop / Azure Portal once more. The WVD session host will now be unassigned, and can now be assigned to a new user.

Another way to do this would be to remove the Windows Virtual Desktop agent from the virtual machine, and then reinstall it, specifying the registration key. The process for doing this is detailed here.

Related posts

A Beginners Guide to Azure Repos

How To Rename a Git Branch

Terraform Count Examples

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More