# Run on an RDS License Server
Get-WmiObject -Namespace "root\CIMV2\TerminalServices" -Class "Win32_TerminalServiceLicenseKeyPack" | Select-Object KeyPackId, ProductVersion, LicenseCount

Output:
KeyPackId : 1234567890123456
ProductVersion : Windows Server 2022
LicenseCount : 50

This is the cleanest way to get the key pack ID for documentation.


If the Licensing Server is already running but you need to document the key for disaster recovery, do not panic. You cannot "view" the full key for security reasons, but you can view the Key Pack ID and the license count.

Solution: Use PowerShell (Method 7) on the old server if it boots. If not, contact the Microsoft Clearinghouse (1-800-936-4900 in the US) with your Volume License Agreement number. They can reissue key pack IDs.


  • If all else fails – contact Microsoft Licensing Support with your old server name, Key Pack ID, and proof of purchase.
  • What if the license server is already licensed, but you need the key for a new server? The RD Licensing Manager tool can show you the key pack IDs of licenses already installed.

    Error Report