How do I change my product key in command prompt?

Windows 10 requires activation to verify you're running a genuine copy; a unique product key is used to ensure the a single licensed copy of Windows isn't being used on more than are allowed.

Occasionally, you may have to change the product key. If you're getting Windows 10 for the first time and a product key wasn't provided during the installation, or a generic key was used to upgrade, you'll need a new valid product key to activate the operating system.

In this Windows 10 guide, you'll learn five ways to bring up the Windows activation tool to change the product key on your computer.

  • How to change Windows 10's product key using Settings
  • How to change Windows 10's product key using Control Panel
  • How to change Windows 10's product key using Command Prompt
  • How to change Windows 10's product key using SLUI 3
  • How to change Windows 10's product key using CHANGEPK

How to change Windows 10's product key using Settings

  1. Open Settings.
  2. Click on Update & security.
  3. Click on Activation.
  4. Click the Change product key link.

  1. Type the 25-digit product key for the version of Windows 10 you want.
  2. Click Next to complete the process.

If the activation process completes successfully, you'll get the "Windows is activated" message.

How to change Windows 10's product key using Control Panel

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select System.
  2. Click the Change product key link under the Windows activation section.

  1. Type the 25-digit product key for the version of Windows 10 you want.
  2. Click Next to complete the process.

Similar to the Settings app, if the activation process completes successfully, you'll get the "Windows is activated" message.

How to change Windows 10's product key using Command Prompt

  1. Open the Start menu.
  2. Search for Command Prompt.
  3. Right-click the result and select Run as administrator.
  4. Type the following command using your 25-digit product key and press Enter:slmgr.vbs /ipk

If you typed the product key correctly and the process completes successfully, you'll see a dialog box reading "Installed product key YOURP-RODUC-TKEYX-XXXXX-XXXXX successfully."

How to change Windows 10's product key using SLUI 3

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type slui.exe 3 and click OK to open the Windows activation client.
  3. Type the 25-digit product key for the version of Windows 10 you want.

  1. Click Next to complete the task.

If the activation process completes successfully, you'll get the "Windows is activated" message.

How to change Windows 10's product key using CHANGEPK

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type changepk.exe and click OK to open the Windows activation client.
  3. Enter the 25-digit product key for the version of Windows 10 you want.

  1. Click Next to complete the task.

If the activation process completes successfully, you'll get the "Windows is activated" message.

Alternatively, you can use change the product key using changepk.exe using the Command Prompt as well. Here's how:

  1. Open the Start menu.
  2. Search for Command Prompt.
  3. Right-click the result and select Run as administrator.
  4. Type the following command using your 25-digit product key and press Enter:changepk.exe /ProductKey

Wrapping things up

While for the most part, you'll be using the Settings app to change the product key on Windows 10, if the option isn't available or if you're looking to create a script to change the product key on your computer, it's good to have different alternatives.

If you're trying to upgrade the operating system by purchasing a new license from the Windows Store, everything regarding the product key will be handled automatically for you.

Also, remember that you must be signed in with an administrator account to change your system's product key, and you'll need an internet connection to complete the activation.

In the case, you recently made significant hardware changes to your PC, and Windows 10 won't activate, you can use the Activation Troubleshooter to re-activate your copy of Windows 10.

Although this guide is specific to Windows 10, the Control Panel, slui.exe, and slmgr.vbs methods that we're showing you here will work to change the product key on Windows 8.1 or Windows 7.

More Windows 10 resources

For more help articles, coverage, and answers on Windows 10, you can visit the following resources:

  • Windows 10 on Windows Central – All you need to know
  • Windows 10 help, tips, and tricks
  • Windows 10 forums on Windows Central

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

How can I change my PC product key?

Select the Start button, and then select Settings > Update & Security > Activation . Select Change product key. Type in the product key found on the COA and follow the instructions.

Can I activate Windows through CMD?

On a client computer, open a Command Prompt window, type Slmgr. vbs /ato , and then press ENTER. The /ato command causes the operating system to attempt activation by using whichever key has been installed in the operating system. The response should show the license state and detailed Windows version information.

What is Slmgr command?

Slmgr Uses Software Licensing Management Tool (slmgr) is a VBS file in Windows against which you can run commands to perform advanced Windows product activation tasks. Slmgr. vbs is used only for the Windows operating system. Ospp. vbs manages volume licensing for Microsoft Office products.