WVD HostPool Registration Key - NielsKok.Tech Azure Virtual ...
Maybe your like
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 PortalNext, go to your WVD hostpool in the portal. For example:

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

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:
$installedPackageProvider = Get-PackageProvider if ($installedPackageProvider.Name -notmatch "NuGet") { Install-PackageProvider -Name NuGet -force Write-Host("Install powershell module NuGet") } $installedModules = Get-InstalledModule if ($installedModules.Name -notmatch "Az.Accounts") { Install-Module Az.Accounts -Force -AllowClobber Write-Host("Install powershell module Az Accounts") } if ($installedModules.Name -notmatch "Az.Resources") { Install-Module Az.Resources -Force -AllowClobber Write-Host("Install powershell module Az Resources") } if ($installedModules.Name -notmatch "Az.DesktopVirtualization") { Install-Module Az.DesktopVirtualization -Force -AllowClobber Write-Host("Install powershell module Az DesktopVirtualization") }After that, log on to Microsoft Azure:
Connect-AzAccountIn addition, select the proper subscription if you have multiple:
Select-AzSubscription -SubscriptionId "SUBSCRIPTION ID" | Set-AzContextCreate 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
$resourceGroupName = "RESOURCEGROUP NAME OF HOSTPOOL" $Hostpool = "HOSTPOOL NAME" $SubsciptionID = "SUBSCRIPTION ID" $GetToken = New-AzWvdRegistrationInfo -SubscriptionId $SubsciptionID -ResourceGroupName $resourceGroupName -HostPoolName $Hostpool -ExpirationTime (Get-Date).AddDays(14) -ErrorAction SilentlyContinueA 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:
$GetToken.TokenThat way you can register new sessionhosts to your hostpool using Powershell:

References
Microsoft Doc about registration keyOther Posts:Snapshot and upload a managed diskRDP ShortPath for WVD
Tag » A.registration Key
-
Activate Registration Key - Thomson Reuters Legal Solutions
-
About The Registration Key - Safe Software
-
[PDF] How To Get And Use A Registration Key
-
How To Get A Registration Key - YouTube
-
Registration Key Definition | Law Insider
-
Manage Registration Keys - Oracle Help Center
-
10.2 Creating Registration Keys And Rules
-
Key Registration - Glossary - NIST Computer Security Resource Center
-
AVD Add New Session Hosts To Existing Host Pool | Registration Key
-
Identify Registration Key Or Activation Code
-
Create A Registration Key Pool For Standalone BIG-IP VE Licenses
-
How Do I Find My NETGEAR Registration Key? | Answer
-
How To Obtain A Registration Key For Visual Basic 2010 Express After