How to Guide, Microsoft Windows

How to Change the Product Key in Windows 11 (Settings, slmgr and CMD)

Illustration of a laptop showing a product key entry box for changing the product key in Windows 11

To change the product key in Windows 11, open Settings > System > Activation, select Change next to “Change product key” and enter the new 25-character key. If that button is missing or fails, the same job can be done from an administrator Command Prompt with slmgr /ipk followed by slmgr /ato. Both methods take about two minutes.

Key takeaways

  • Settings is the simplest route: Settings > System > Activation > Change product key.
  • slmgr /ipk installs a key and slmgr /ato activates it; both need an elevated Command Prompt.
  • The new key must match the installed edition, unless it is a Pro key entered on Home, which triggers an upgrade.
  • Changing a key does not touch your files or apps.
  • Run slmgr /dli afterwards to confirm the new key’s last five characters and licence status.

When should you change your Windows 11 product key?

You should change your Windows 11 product key when the current one has stopped activating, when you are upgrading from Home to Pro, when a PC was set up with a generic or organisation key, or when you have bought a retail licence to replace an OEM one. In every case the installed copy of Windows stays as it is; only the licence changes.

A typical support scenario is a second-hand PC that shows the “Activate Windows” watermark because the previous owner’s key was tied to different hardware. Another is a home build where Windows was installed without a key during setup. Both are fixed by entering a valid key using the steps below.

It helps to know what a product key does here. Windows uses the key to identify which edition you are entitled to and then asks Microsoft’s activation servers to confirm it. Once activated, the PC usually receives a digital licence linked to its hardware, which is why a reinstall on the same machine often reactivates on its own. If you are unsure whether you need to change anything, first check whether Windows 11 is activated.

Change key or reinstall?

You almost never need to reinstall to change a key. The one exception is when the key is for a completely different edition family, such as an Enterprise key on a Home installation. Edition rules are covered in the errors section below.

How to change the product key in Windows 11 Settings

The quickest way to change the product key in Windows 11 is through Settings: go to System, then Activation, open “Change product key” and type the new key. You need to be signed in with an administrator account, and the PC needs an internet connection so Windows can activate the key immediately.

  1. Open Activation settings. Press Windows + I to open Settings, then go to System > Activation.
  2. Expand the upgrade section. Select Upgrade your edition of Windows (or the Activation state heading) so the “Change product key” row is visible.
  3. Select Change. Next to Change product key, select Change. Approve the User Account Control prompt with an administrator account.
  4. Enter the new key. Type the 25-character key in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX and select Next.
  5. Activate. Select Activate. Windows contacts Microsoft and shows “Windows is activated” when it succeeds.
  6. Confirm. Back on the Activation page, the Activation state should read Active. If you entered a Pro key on Home, Windows prepares the upgrade and asks you to restart.

Microsoft documents the Home to Pro version of this flow on its upgrade Windows Home to Pro page, and our own guide to upgrading Windows 11 Home to Pro covers what changes after the restart.

Flat illustration of a command prompt window used to change a Windows key with slmgr

How to change the key with slmgr in CMD

To change the Windows 11 product key from the command line, open Command Prompt as administrator and run slmgr /ipk followed by your key, then slmgr /ato to activate it. Each command shows a small Windows Script Host dialog confirming success or giving an error code.

  1. Right-click Start, choose Terminal (Admin), or search for “cmd”, right-click Command Prompt and choose Run as administrator.
  2. Optional: run slmgr /upk to uninstall the current key first. This is not required, because /ipk replaces the existing key, but it gives a clean slate if activation has been unreliable.
  3. Run slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with your own key. Wait for “Installed product key … successfully”.
  4. Run slmgr /ato to activate online. Wait for “Product activated successfully”.
  5. Run slmgr /dli to confirm the edition, the last five characters of the key and the licence status.
Command What it does Admin needed?
slmgr /ipk <key> Installs a product key, replacing any existing key Yes
slmgr /ato Attempts online activation of the installed key Yes for retail and MAK keys
slmgr /dli Shows edition, partial key and licence status No
slmgr /dlv Shows detailed licence information, including activation ID No
slmgr /xpr Shows whether activation is permanent or when it expires No
slmgr /upk Uninstalls the current product key Yes
slmgr /cpky Clears the key from the registry (it stays installed) Yes

The full syntax is on Microsoft Learn’s slmgr.vbs options reference. Microsoft notes that after /ipk a restart is advisable so the licensing service settles properly.

A point most guides skip: slmgr /upk on its own leaves Windows unlicensed after the next restart. Only use it if you have the replacement key ready.

Other ways to enter a product key

If the Change product key button is greyed out or does nothing, press Windows + R and run slui, which opens the Windows activation window where you can type a key. You can also enter a key during a clean install, on the “Activate Windows” screen of Setup.

  • slui: Windows + R, type slui, press Enter. Useful when Settings fails to open the key dialog.
  • PowerShell: slmgr works the same in an elevated PowerShell or Terminal window.
  • During setup: Windows Setup asks for a key early on. If you chose “I don’t have a product key”, add it later with any method above. Our Windows 11 bootable USB guide covers clean installs.
  • By phone: some keys, especially phone-activation editions, need a Confirmation ID instead of online activation. See how to activate Windows by phone.

Before you swap keys, it is worth saving the current one in case you need it. Our guide on finding your Windows 11 product key shows where to look.

Need a key that will activate?

If your current key has stopped working or you are moving to Pro, a Windows 11 Pro retail key can be entered with either method above, and retail licences can be moved to a new PC later. On a Home installation, the Home to Pro upgrade key is the direct route.

Why won’t Windows accept my new product key?

Windows usually rejects a new product key because it is for a different edition from the one installed, it has already been used on its maximum number of devices, or it was typed incorrectly. Activation errors give a code, and that code tells you which of these it is.

Error Usual meaning What to do
0xC004F050 Key is invalid for this edition Check edition; see our 0xC004F050 fix
0xC004C008 Key already used on another PC See our 0xC004C008 guide
0x80070057 Parameter or service error during activation See our 0x80070057 fix
0xC004F074 KMS server not reachable (organisation key) Replace with a retail key using slmgr /ipk

Edition matching is the cause we see most. Microsoft’s activation help says the key must match the edition of Windows installed, so a Home key will not activate Pro, and a Pro key will not activate Enterprise or Education. A Pro key on Home is the exception: Windows treats it as an upgrade.

If the key was accepted but Windows later shows “not activated” after you replaced a motherboard, that is a hardware-change issue rather than a key issue. Our guide to Windows activation after a hardware change covers the troubleshooter route. Microsoft’s Windows activation errors page lists other codes.

Frequently asked questions

Does changing the product key delete my files?

No. Changing the product key only replaces the licence information that Windows uses for activation. Your files, installed programs and settings stay exactly as they were. The only time anything visible changes is when a Pro key is entered on Home, which adds Pro features after a restart.

Can I change a Windows 11 Home key to a Pro key?

Yes. Entering a valid Windows 11 Pro key in Settings > System > Activation > Change product key upgrades Home to Pro in place. Windows must be activated on Home first, according to Microsoft. The upgrade keeps your files and apps and finishes after a restart.

What is the slmgr command to change the product key?

The command is slmgr /ipk followed by the 25-character key, run in an administrator Command Prompt. It replaces the installed key. Follow it with slmgr /ato to activate the key online, then slmgr /dli to confirm the new key’s last five characters and the licence status.

Why is Change product key greyed out?

It is usually greyed out because you are not signed in as an administrator, or because the PC is managed by an organisation through policy. Sign in with an admin account and try again. If it still fails, press Windows + R and run slui, or use slmgr /ipk from an elevated Command Prompt.

Do I need to restart after changing the product key?

For a straightforward key swap, Windows usually activates without a restart. A restart is needed when the new key changes the edition, such as Home to Pro. After using slmgr /ipk, Microsoft recommends restarting so the Software Protection service picks up the change cleanly.

Can I use the same product key on two PCs?

Not at the same time with a standard retail or OEM licence. Each licence covers one device. A retail key can be moved to a new PC once removed from the old one, while multi-device products such as five-PC packs include separate activations.

The bottom line

Changing the product key in Windows 11 takes a couple of minutes through Settings, and slmgr /ipk plus slmgr /ato covers every case where Settings will not cooperate. Match the key to your edition and you will avoid nearly all errors; if you are moving the licence to new hardware, read our guide to transferring a Windows licence to a new PC.

Resource Why it helps
Microsoft Learn: slmgr.vbs options Full syntax and permission notes for every slmgr switch
Microsoft: upgrade Home to Pro Official steps for entering a Pro key on Home
Microsoft: Windows activation errors Error code meanings and the Activation troubleshooter
Check if Windows 11 is activated Confirm status before and after changing the key
Find your Windows 11 product key Save the current key before replacing it
Upgrade Windows 11 Home to Pro What happens when a Pro key goes on Home
Fix error 0xC004F050 The most common “invalid key” error
Activation after a hardware change When the key is fine but the hardware changed
Windows 11 Pro retail key Transferable Pro licence for Settings or slmgr activation


Leave a Reply

Your email address will not be published. Required fields are marked *