Did Windows fail to recognize the bios activation key after a clean install on a device? These commands will retrieve the key for you without the need for third-party software. How To Retrieve OEM Windows License Key? Look inside.
Run this in PowerShell (Elevated) to retrieve the key
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

Retrieve & install: (run in elevated prompt)
@echo off
FOR /F "skip=1" %%A IN ('wmic path SoftwareLicensingService get OA3xOriginalProductKey') DO (
SET "ProductKey=%%A"
goto InstallKey
)
:InstallKey
IF [%ProductKey%]==[] (
echo No key present
) ELSE (
echo Installing %ProductKey%
changepk.exe /ProductKey %ProductKey%
)