How to change the product key in Windows 10 and 11
You may need a new key after buying a licence, moving from Home to Pro, or replacing a corporate key.
Way 1: Settings
Open Activation in Settings and click Change product key. This is the right choice in most cases.
Way 2: the slui window
Press Win+R, type slui 3 and press Enter. Paste the key into the window that opens.
Way 3: slmgr
In an administrator terminal run slmgr /ipk with the new key, then slmgr /ato to activate.
Way 4: changepk
changepk.exe /productkey followed by the key switches the edition, for example from Home to Pro.
Removing an old key
slmgr /upk removes the installed key and slmgr /cpky clears it from the registry. Do this before you sell or give away a PC with a Retail licence.
Will changing the key delete my files?
No. Changing the key changes only the licence, and your files and apps stay.