How to activate Windows with Command Prompt (CMD)

Activating Windows is crucial to get access to personalization features, security updates, and technical support. While Windows can be activated in the settings app, using Command Prompt offers more flexibility and control. This comprehensive guide will teach you everything you need to know to activate Windows using CMD.

Key Takeaway

The key steps to activate Windows with Command Prompt are:

  • Open CMD as administrator
  • Type ‘slmgr /ipk’ followed by the product key to install the key
  • Use ‘slmgr /ato’ to activate Windows online
  • Alternatively, use ‘slmgr /ato’ with a proxy server to activate offline
  • Check activation status with ‘slmgr /dlv’

Following these steps with the right product key will activate your Windows successfully using Command Prompt.

Prerequisites for Activation

Before starting the activation process, ensure:

  • You have administrative privileges on the computer.
  • The Windows version installed is genuine and not pirated.
  • You have a valid Windows product key ready. This is a 25-character code that looks like “XXXXX-XXXXX-XXXXX-XXXXX-XXXXX”.
  • The computer has internet access (for online activation).

Step-by-Step Guide to Activate Windows using CMD

Follow these steps carefully to activate Windows properly with Command Prompt:

Open Command Prompt as Administrator

The first step is to open the Command Prompt with admin privileges. Here is how to do it:

  1. Press Win + X and click on Command Prompt (Admin).
  2. When prompted by UAC, click Yes to approve elevation.

This will open the CMD window with administrator rights.

Install Your Product Key

Once CMD is open, you need to enter your product key using the command:


Replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with your actual 25-character product key.

This will install the product key in Windows. If successful, you will see the message “Installed product key successfully”.

Activate Windows Online

With the key installed, you can now activate Windows. To do it online, use the command:

slmgr /ato

This will contact Microsoft’s activation servers and activate Windows automatically. The whole process usually completes in under a minute.

Once activated successfully, you will see the confirmation message “Operation Completed Successfully”.

Activate Windows Offline

If the computer has no internet access, you can still activate Windows using CMD with a proxy.

To do offline activation, use this command syntax:

slmgr /ato ProxyServerName:Port

So for example, if the proxy server is at, the command will be:

slmgr /ato ProxyServerName:

This connects to the proxy server to activate Windows through the internet.

Offline activation may take longer and involve more steps depending on your network. Follow the on-screen instructions carefully to complete the process.

Check Activation Status

To verify if Windows is properly activated, use the command:

slmgr /dlv

This will display details about the license status including the partial product key, license status, and remaining activations.

Look under ‘License Status’. If it shows ‘Licensed’, it means Windows is activated correctly.

If activation failed for some reason, this command can help identify and troubleshoot the problem.

Slmgr Activation Commands and Options

Here is an overview of the different slmgr commands and switches you can use for activation:

  • /ipk – Install product key
  • /ato – Activate online
  • /ato ID – Activate offline with Proxy ID
  • /dli – Display license information
  • /dlv – Check license status
  • /xpr – Expire license
  • /rearm – Refresh/reset activation count
  • /upk – Uninstall product key

The slmgr tool offers advanced options as well. Some useful ones include:

  • /dti – Set activation interval
  • /csp – Specify activation server (name or IP)
  • /cps – Display activation servers tried already

By combining the right commands and options, you can control Windows activation as needed via the command line.

FAQs on Activating Windows with CMD

Here are answers to some frequently asked questions about activating Windows using Command Prompt:

Q: Do I need admin rights to use slmgr?

A: Yes, you need to open CMD as administrator to use slmgr commands. Otherwise, you will get access denied errors.

Q: What if I don’t have a product key?

A: You can extract the product key from Registry using third-party tools. But it’s recommended to use the original key that came with your Windows license.

Q: Can I activate multiple Windows versions on one computer?

A: No, you can only activate one Windows version on a single computer at a time. You will need separate licenses and keys for each version.

Q: Does offline activation work without a proxy server?

A: No, a proxy server is required even for offline activation using slmgr. Without it, it cannot contact the Microsoft licensing server.

Q: How many times can a product key be used for activation?

A: Retail keys can only be used for one activation while OEM keys may allow multiple activations on the same hardware. Volume license keys can be used to activate multiple computers.

Q: What happens when hardware changes after activation?

A: Windows becomes unactivated and you have to reactivate. Some hardware changes like RAM and HDD upgrades don’t affect activation.

Troubleshooting Activation Issues

If you are unable to activate Windows using slmgr, some things you can try are:

  • Check if the key was typed correctly without any errors.
  • Try online and offline activation. Offline uses a different activation logic.
  • Verify the system date and time are current, and sync to an NTP server if needed.
  • Make sure your network hardware and settings are proper, including proxy configurations.
  • Confirm that the Windows version is not modified, cracked or pirated. Slmgr will fail if so.
  • Reset the activation count and then retry with ‘slmgr /rearm’.
  • Use slmgr with the ‘/debug’ parameter enabled to get verbose logs for the issue.
  • As a last resort, contact Microsoft Support for help with untangling activation problems.

Following the steps in this guide carefully and using the troubleshooting tips above will help ensure you can activate Windows successfully using Command Prompt.


Activating Windows properly is important to get the full functionality and benefits. While it can be done through Settings, using slmgr commands via Command Prompt offers greater flexibility and options. The steps covered in this guide – opening CMD as admin, installing the product key, activating online or offline, and checking status – allow you to fully activate Windows using just a few simple commands. With the ability to troubleshoot issues and customize the process, Command Prompt activation is a powerful tool for both basic and advanced activation scenarios.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button