Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can activate Windows 11 from an elevated Command Prompt with the built-in slmgr.vbs script. The process has two separate stages: install a valid product key with /ipk, then request activation with /ato. Installing a key alone does not activate Windows.

The key must match the edition installed on the computer—such as Home, Pro, or Enterprise—and must come from a legitimate retail, OEM, or volume-licensing source. A KMS client key is not a substitute for a retail license.

Before you start

  • Have a valid 25-character Windows 11 product key in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
  • Confirm that the key applies to your installed edition.
  • For online activation, connect the PC to the internet.
  • Open Command Prompt as an administrator.

To open an elevated Command Prompt, press Windows, type Command Prompt, right-click the result, choose Run as administrator, and select Yes at the User Account Control prompt.

Activate Windows 11 with CMD

1. Install the product key

In the administrator Command Prompt, run the following command. Replace the example value with your own key:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Microsoft Windows 11 (USB)
  • Less chaos, more calm. The refreshed design of Windows 11 enables you to do what you want effortlessly.
  • Biometric logins. Encrypted authentication. And, of course, advanced antivirus defenses. Everything you need, plus more, to protect you against the latest cyberthreats.
  • Make the most of your screen space with snap layouts, desktops, and seamless redocking.
  • Widgets makes staying up-to-date with the content you love and the news you care about, simple.
  • Stay in touch with friends and family with Microsoft Teams, which can be seamlessly integrated into your taskbar. (1)
cscript.exe %windir%system32slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

The /ipk option installs or replaces the current product key. Windows checks whether the key is valid and compatible with the installed edition. If a key is already present, a valid replacement key can replace it.

Look for a message such as Product key XXXXX-XXXXX-XXXXX-XXXXX-XXXXX installed successfully. If Windows reports that the key cannot be used, check the edition and the key source before trying again.

2. Restart the licensing service if necessary

Microsoft recommends restarting Windows or the Software Protection Service after installing a key to avoid licensing-service instability. Restarting the PC is the simplest option:

shutdown /r /t 0

After Windows restarts, reopen an administrator Command Prompt. You can also restart the service without rebooting:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
net stop sppsvc && net start sppsvc

If the service refuses to stop or start, restart Windows instead. Do not interrupt the process while Windows is applying the licensing change.

3. Start online activation

Run:

cscript.exe %windir%system32slmgr.vbs /ato

The /ato option attempts activation using the mechanism associated with the installed license. For a retail key or MAK, this normally means contacting Microsoft’s activation service. For a KMS client, it means contacting the configured KMS host.

A successful result normally appears in a Windows Script Host dialog stating that Windows has been activated successfully.

Check whether Windows activated

Use these commands from an administrator Command Prompt to inspect the result:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Command What it shows
cscript.exe %windir%system32slmgr.vbs /dli Basic license information for the active Windows edition.
cscript.exe %windir%system32slmgr.vbs /dlv Detailed licensing information, including channel and activation data.
cscript.exe %windir%system32slmgr.vbs /dlv all Detailed information for all installed editions and components. This also reveals Activation ID values.
cscript.exe %windir%system32slmgr.vbs /xpr Whether activation is permanent or expires on a specified date.

For a normal permanently activated retail installation, /xpr should report that Windows is permanently activated. KMS-based installations are time-limited and renew periodically when they can reach the organization’s KMS infrastructure.

You can also confirm the result in the graphical interface by opening Settings > System > Activation. The page shows the installed edition and activation status.

Activating a specific installed edition

Most computers only need the basic /ato command. If several Windows editions or licensing components are installed, first run:

cscript.exe %windir%system32slmgr.vbs /dlv all

Find the relevant Activation ID, then append it to the activation command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Microsoft Windows 11 PRO (Ingles) FPP 64-BIT ENG INTL USB Flash Drive
  • MICROSOFT WINDOWS 11 PRO (INGLES) FPP 64-BIT ENG INTL USB FLASH DRIVE
cscript.exe %windir%system32slmgr.vbs /ato <Activation-ID>

This limits the activation attempt to the edition associated with that Activation ID.

Retail, MAK, and KMS keys are different

The activation command is similar, but the licensing environments are not interchangeable.

License type How it works Where it belongs
Retail or OEM Uses a key assigned to the individual PC or purchaser and activates through an authorized Microsoft activation method. Personal computers and ordinary business purchases.
MAK Activates directly against Microsoft’s activation services. Installing the key does not complete activation; run /ato afterward. Organizations with volume licenses that use Multiple Activation Keys.
KMS Uses a volume-license client setup key and an organization’s KMS host. It does not create a retail entitlement. Managed organizational networks with a configured KMS service.

Example: MAK activation

An organization-issued MAK follows the same two-command sequence:

cscript.exe %windir%system32slmgr.vbs /ipk <MAK-key>
cscript.exe %windir%system32slmgr.vbs /ato

Replace <MAK-key> with the actual key supplied by the organization’s licensing administrator.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Example: KMS activation

A KMS client must be on an organization’s network or otherwise able to reach its KMS host. If automatic DNS discovery is unavailable, an administrator can specify the host:

cscript.exe %windir%system32slmgr.vbs /skms kms.example.com:1688
cscript.exe %windir%system32slmgr.vbs /ato

Port 1688 is the standard KMS TCP port. Use the real KMS host name supplied by the organization; do not replace it with an arbitrary public server. A KMS client key is intended for volume licensing and will not permanently activate a retail installation.

Common activation errors and fixes

“The product key is invalid” or the key is not applicable

This usually means the key does not match the installed edition, is mistyped, or is not valid for that licensing channel. Check the edition under Settings > System > About or with /dli. A Windows 11 Pro key cannot normally activate Windows 11 Home without changing the edition, and changing the key by itself does not upgrade the installation.

Error 0xC004C003: product key blocked

Microsoft identifies a blocked MAK as one possible cause. Verify the key with the person or organization that issued it. If you have another valid key, install it with /ipk and retry /ato. Persistent failures require the license administrator or Microsoft Support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Error 0xC004C008: activation limit reached

This indicates that the key’s permitted activation use or activation condition may have been exhausted. Reinstalling the same key repeatedly will not solve that limit. Contact the seller, license administrator, or Microsoft Support.

Error 0x8007232B: DNS name does not exist

This is commonly a KMS discovery failure. The computer is trying to find a KMS host through DNS but cannot locate the required service record. Connect to the organization’s network or VPN, confirm that internal DNS is in use, and ask the administrator for the correct KMS host. This is a network or KMS configuration issue, not a problem with the /ato syntax.

KMS activation count is too low

A KMS host must meet Microsoft’s required activation threshold before it can activate clients. Changing commands on the client does not bypass that requirement; the KMS administrator must resolve the host configuration or activation-count issue.

Access is denied

Close Command Prompt and reopen it with Run as administrator. Both /ipk and the normal online /ato workflow require elevation unless special Software Protection Service permissions have been configured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Microsoft System Builder | Windоws 11 Home | Intended use for new systems | Install on a new PC | Branded by Microsoft
  • STREAMLINED & INTUITIVE UI, DVD FORMAT | Intelligent desktop | Personalize your experience for simpler efficiency | Powerful security built-in and enabled.
  • OEM IS TO BE INSTALLED ON A NEW PC with no prior version of Windows installed and cannot be transferred to another machine.
  • OEM DOES NOT PROVIDE SUPPORT | To acquire product with Microsoft support, obtain the full packaged “Retail” version.
  • PRODUCT SHIPS IN PLAIN ENVELOPE | Activation key is located under scratch-off area on label.
  • GENUINE WINDOWS SOFTWARE IS BRANDED BY MIRCOSOFT ONLY.

Activation fails without internet access

MAK online activation needs access to Microsoft’s activation service and may be affected by firewall or proxy rules. Check the organization’s firewall requirements or use an authorized phone/offline activation process where available.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Offline or telephone activation

If online activation is unavailable, /dti displays the Installation ID needed for an authorized offline activation process:

cscript.exe %windir%system32slmgr.vbs /dti

After obtaining a Confirmation ID through the applicable Microsoft Activation Center procedure, apply it with:

cscript.exe %windir%system32slmgr.vbs /atp <Confirmation-ID>

Use this method only with a valid license and the official activation process. The command does not generate a license or bypass activation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Translate an activation error code

When slmgr.vbs returns a hexadecimal error, Windows can display a description with:

slui.exe 0x2a 0x <ErrorCode>

For example, replace <ErrorCode> with the hexadecimal code returned by the activation attempt. Keep the 0x prefix in the command.

Commands that do not activate Windows

/ipk only installs a key, while /rearm resets activation timers. Neither command supplies a license or permanently activates Windows. Likewise, pointing /skms at an unrelated internet server is not an official activation method and does not provide licensing entitlement.

FAQ

Does CMD activate Windows 11 by itself?

No. Command Prompt runs the Windows licensing script slmgr.vbs. Install a valid key with /ipk, then initiate activation with /ato.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What is the exact command to activate Windows 11?

In an elevated Command Prompt, use cscript.exe %windir%system32slmgr.vbs /ato after a compatible product key has been installed. If no valid key is installed, run /ipk first.

Can I use a KMS key on Windows 11 Home or a retail PC?

No. KMS client keys are for volume-licensing environments and require access to an organization’s KMS host. They are not retail licenses and do not permanently activate an ordinary personal installation.

How do I check Windows 11 activation from CMD?

Run cscript.exe %windir%system32slmgr.vbs /xpr to check the expiration status, or /dlv for detailed licensing information.

Does changing the product key change Windows 11 Home to Pro?

No. The key must match the installed edition, and installing a different key does not automatically change the edition. Use an authorized edition-upgrade path if an upgrade is required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

For a legitimate Windows 11 activation, open an elevated Command Prompt, install a compatible key with slmgr.vbs /ipk, activate with slmgr.vbs /ato, and verify the result with /xpr or /dlv. Retail, MAK, and KMS keys follow different licensing rules, so a failed command should be diagnosed by its error code and licensing environment—not by repeatedly trying random keys or KMS hosts.

Quick Recap

SaleBestseller No. 1
Microsoft Windows 11 (USB)
Microsoft Windows 11 (USB)
Make the most of your screen space with snap layouts, desktops, and seamless redocking.; FPP is boxed product that ships with USB for installation
$128.00
Bestseller No. 2
Microsoft Windows 11 PRO (Ingles) FPP 64-BIT ENG INTL USB Flash Drive
Microsoft Windows 11 PRO (Ingles) FPP 64-BIT ENG INTL USB Flash Drive
MICROSOFT WINDOWS 11 PRO (INGLES) FPP 64-BIT ENG INTL USB FLASH DRIVE
Bestseller No. 3

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.