I recently purchased an Azulle Byte3 for use as my media server. I found the internal SSD that it came with was not large enough for my needs, so I purchased an M.2 which I want to use as the boot drive.
But that means installing Windows 10 on the M.2.
For that I need the Windows Product Key.
But the Byte3 does not have a sticker or other paper indicating what the product key is. So I had to search around for how to find it. The answer, it turns out, is to run the following command in PowerShell:
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
That method works for machines where it key is embedded in the UEFI firmware.
If the key is stored in the Windows registry, save the following as a .vbs file and execute it by double-clicking the file:
Set WshShell = CreateObject("WScript.Shell")
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Cur = 0
x = 14
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
Loop While i >= 0
ConvertToKey = KeyOutput
This site is the source of the above command and code, and covers some other methods that can be used in other circumstances.