Recover the OEM key and reactivate Windows with slmgr
Read the firmware OEM key with PowerShell and use slmgr to display the license and enter a product key.
After a Windows reinstall or a motherboard change, activation can be lost. If the machine has an OEM product key stored in its firmware, you can read it with PowerShell, then reactivate Windows with slmgr.
Read the OEM key
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
Display license information
slmgr /dlv
Enter a product key
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with the product key to install.
License management service
The Windows license management service is managed from services.msc.