Although Microsoft initially said that the free Windows 10 upgrade was without restrictions, that's not entirely true. You can transfer a Windows 10 license to a newly acquired PC or hard drive, depending on various factors like how the license was bought, the Windows edition you have and so on.
For example, if you had a retail copy of an earlier version like Windows 7 or Windows 8 and upgraded to Windows 10, then you are allowed to transfer Windows 10 license just once to a different PC. If you own a full retail copy of Windows 10 that you paid for, then you can transfer it an unlimited number of times. However, if you upgraded to Windows 10 from a machine that had Windows 7 or Windows 8 preinstalled, then a license transfer for Windows 10 copy will not be possible. That being said, if you upgraded from Windows 10 Home to Windows 10 Pro through the Easy Upgrade program, then you can use Digital Licensing because it is still a retail license that's linked to the Microsoft Account it was originally purchased through.
If that's confusing, don't worry. As long as you bought a retail copy of Windows 10 or a previous version prior to upgrading, you're good to go. The overall process can be broken down into the following steps:
Part 1: Deactivate Windows 10 License Key on Old PC
This step is very easy, but it has to be done in elevated Command Prompt. To access CMD with admin rights, click Windows + X and select Command Prompt (Admin). This opens the command line utility, where you need to enter the following line and then hit Enter:
slmgr.vbs /upk (Uninstall Windows 10 Product Key )
slmgr.vbs /cpky (Remove Product Key from Registry )
This combined commands uninstall the product key from the computer and remove the key also fromRegistry; so there is no complication at Microsoft's end with their Activation Servers for further usage, when activating your Windows 10 copy on the new PC. Nevertheless, there's one more step to execute to make sure that there's no conflict with the product key.
Part 2: Format Old Windows 10 PC
This is a precautionary step to ensure that the license is not being used on the old PC any more. You can do a full reset to accomplish this. However, you should backup the data on the hard drive first to avoid data loss. Here's the process to reset a Windows 10 PC.
Step 1: Go to Settings > Update & Security > Recovery on the old PC.
Step 2: Under Reset This PC, click on Get Started. A new window will pop up with three options: Keep My Files or Remove Everything. Ideally, if you're selling the old PC then choose the second option.
Step 3: The next window shows another two options: Just remove my files, and Remove files and clean the drive. Select the second option.
Step 4: In the warning window that is displayed, click Next. In the next window, confirm the action by hitting the Reset button. After several restarts, you'll see another window with three options: Continue, Troubleshoot and Turn off your PC. Choose the third option.
Your Windows 10 license has now been fully removed from the old PC. The next section shows you how to do a clean install of Windows 10 and reactivate the license on the new PC.
Part 3: Transfer Windows 10 License to New Computer and Activate the Key
Installing Windows 10 from scratch requires the creation of installation media. This can be a disk or USB drive containing the bootable Windows 10 ISO file that you are licensed to use. To create this, you need a disk authoring software like ImgBurn or FreeISOBurner to burn Windows 10 ISO to USB or DVD. Once you've created the media, you can boot your new PC from this disk or drive.
In order to do that, you will need to change the boot order on the computer. During startup, press the F2 key, which takes you to the BIOS Setup Utility page. Here, change the boot order, save and exit. When the boot resumes, it will boot into Windows Setup.
In Windows Setup, define your language and other options as prompted on the screen. When you see the Install button, click it. In the next window, select Custom: Install Windows Only (Advanced.) This is when you'll be asked for your license or product key. If you bought a retail copy of Windows 10, you'll have received the code along with the digital download. You can also use your valid Windows 7 or Windows 8 product key if you had upgraded your OS on the old computer.
Once you've entered the product key, choose the drive where Windows 10 should go. If it's a new drive you'll see "unallocated space" as an option. If not, choose the hard drive. Click Next after making your choice. During the installation process, Windows Setup will show you the drive partitions. Delete all partitions and select the correct drive. Finally, hit the Install button and wait for your Windows 10 installation to be complete.
Since you've already entered the product key, your copy of Windows 10 is now properly licensed, and you have successfully transferred it from the old computer to the new PC. You can check whether the license key is activated for not by goin to Control Panel -> Update & Security -> Activation.