Skip to main content

Activating using Command Line

Sometimes Microsoft Windows will not activate using the user interface. If this is the case, you can activate Windows using the command line. Before activating, you must uninstall, clear and install the new key. Follow the steps below to activate Windows.

Activating Windows Online

  1. Open Command Prompt, or PowerShell, as an Administrator
  2. Enter slmgr.vbs /upk and press Enter to uninstall the product key.
  3. Enter slmgr.vbs /cpky and press Enter to clear the product key from registry.
  4. Enter slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX and press Enter to install the new product key. Replace the Xs with your product key.
  5. Enter slmgr.vbs /ato and press Enter to activate Windows using the Internet.
  6. If you receive the Windows is Activate prompt, you are good to go.

Activating Windows Offline

  1. Open Command Prompt, or PowerShell, as an Administrator
  2. Enter slui 0x4 then press Enter.
  3. When the Activation prompt opens, select your Country then click Next.
  4. From a smartphone, call the Toll Free Number on the prompt.
  5. Follow the prompts on the call. When asked if you have a smartphone, say Yes.
  6. Click the activation link in the text you receive.
  7. Select the correct number of digits.
  8. When prompted, enter the Installation ID.
  9. When you receive your confirmation ID, click the Enter Confirmation ID on the Windows device.
  10. Enter the Confirmation ID, then click Activate windows.
  11. Close the Windows is Activated prompt when it appears.

Commands

Description

Command

Uninstall Current Product Key slmgr.vbs /upk
Clear Product Key from Registry slmgr.vbs /cpky
Install New Product Key slmgr.vbs /ipk [new-product-key]
Activate Windows Online slmgr.vbs /ato
Display License Information slmgr.vbs /dli
Display Detailed License Information slmgr.vbs /dlv
Display License Expiration Date slmgr.vbs /xpr
Reset Licensing Status slmgr.vbs /rearm
Open Windows Settings Activation Prompt

slui

Open Windows Offline Activation Prompt

slui 4