Execute the command below via command prompt.
Slmgr.vbs /dli
Execute the command below via command prompt.
Slmgr.vbs /dli
Command Prompt
wmic path softwarelicensingservice get OA3xOriginalProductKey
Powershell
powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey"