Open Powershell as administrator, and paste following code
$code = (Get-WmiObject -query "select * from SoftwareLicensingService").OA3xOriginalProductKey
slmgr /ipk $code
slmgr /ato
Software and hardware
Open Powershell as administrator, and paste following code
$code = (Get-WmiObject -query "select * from SoftwareLicensingService").OA3xOriginalProductKey
slmgr /ipk $code
slmgr /ato