Step 1: Get the Code
Right-click the Start Menu and open Terminal (Admin) or Command Prompt (Admin). Run this command:
wmic path softwarelicensingservice get OA3xOriginalProductKey
Step 2: Copy the Key
Highlight and copy the 25-character product key that appears on the screen (formatted as XXXXX-XXXXX-XXXXX-XXXXX-XXXXX).
Step 4: Activate
Go to Settings > System > Activation. Click Change product key, paste your extracted code, and hit Activate.