If the operating system key was embedded by the manufacturer, there are a few ways to get it.
You can try running Activate windows, then when it fails, let it run the troubleshooter, and reactive.
Sometimes this will pull the key and just work.
Failing that, you can get it from PowerShell and insert it into windows.
In the start menu, type PowerShell, then select "Run as admin" on PowerShell app.
Inside powershell, type the following.
(Get-WmiObject -Class SoftwareLicensingService).OA3xOriginalProductKey
If this shows you the key, you can then run this to set the key into Windows and run the activation
$key = (Get-WmiObject -Class SoftwareLicensingService).OA3xOriginalProductKey
if ($null -ne $key) {
Invoke-Expression "cscript.exe /b C:\windows\System32\slmgr.vbs /upk"
Invoke-Expression "cscript.exe /b C:\windows\System32\slmgr.vbs /ipk $key"
}
Invoke-Expression "cscript.exe /b C:\windows\System32\slmgr.vbs /ato"