This blogpost is about getting a Windows Virtual Desktop (WVD) hostpool registration key. This registration key is needed to register new WVD Session Hosts to your hostpool.

I am using 2 methods to get the key. The portal and via Powershell. The portal is the easy way to get the key. For example, you can use this for testing purposes.

Prerequisites

You already have a Windows Virtual Desktop Hostpool.

Get Registration key out of the portal

Firstly, log on the Azure Portal

Next, go to your WVD hostpool in the portal. For example:

Windows Virtual Desktop Hostpool registration key

Lastly, when you clicked on the hostpool, you can find the key here:

Registration key button to generate a key

After you click the button, the generate option appears:

Get Registration key via Powershell

And ofcourse, this is my favorite. It is now time to generate the key via Powershell. You can automate this process.

Firstly, install these modules:

After that, log on to Microsoft Azure:

In addition, select the proper subscription if you have multiple:

Create the token via the following code. This creates a token which is valid for the next 14 days. The maximum life time of a token is 30 days. Use this accordingly

A new token is created, this is the output $GetToken:

If you are forwarding this variable to another piece of code make sure that you only forward the token. Use this to forward only the token:

That way you can register new sessionhosts to your hostpool using Powershell:

References

Microsoft Doc about registration key

Other Posts:
Snapshot and upload a managed disk
RDP ShortPath for WVD

Related Posts

3 thoughts on “WVD HostPool Registration Key

Leave a Reply

Your email address will not be published. Required fields are marked *