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.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Windows 11 can be activated from an elevated Command Prompt with slmgr.vbs, but CMD cannot generate a license. You need either a valid digital license, a matching 25-character product key, or access to an organization’s volume-activation system.

The commands below cover retail and OEM keys, digital-license reactivation, MAK, KMS, Active Directory-based activation, Enterprise subscription activation, and supported offline methods. Before changing anything, check the installed edition and current license state.

Before you start: open Command Prompt as administrator

Most key-installation and activation commands require elevation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open Start and type cmd.
  2. Select Run as administrator.
  3. Choose Yes at the User Account Control prompt.

The commands in this guide use the full path to the Windows licensing script. This avoids errors if Command Prompt is currently open in another folder:

#1 Best Overall
Sandisk 2TB Extreme Portable SSD, Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware, External Solid State Drive, SDSSDE61-2T00-G25
  • Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
  • Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
  • Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
  • Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
  • Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
cscript.exe %windir%System32slmgr.vbs

1. Check the Windows 11 edition

A product key must match the installed edition. A Home key will not activate Pro, and a Pro key will not activate Enterprise.

DISM.exe /Online /Get-CurrentEdition

Typical results include:

DISM result Windows edition
Core Windows 11 Home
Professional Windows 11 Pro
Enterprise Windows 11 Enterprise

To display the Windows version and build, run:

winver

2. Check Windows activation status with CMD

Display basic license information

cscript.exe %windir%System32slmgr.vbs /dli

/dli shows basic licensing information for the current Windows installation.

Display detailed license information

cscript.exe %windir%System32slmgr.vbs /dlv

To inspect all applicable installed products, use:

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

These commands do not require an elevated Command Prompt.

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

Check whether activation is permanent

cscript.exe %windir%System32slmgr.vbs /xpr

Retail and MAK installations normally report permanent activation. KMS clients instead show an expiration or renewal period because they must periodically contact the organization’s KMS host.

3. Activate Windows 11 with a retail, OEM, or MAK key

Use this method when you own a valid product key or have been given a MAK key by your organization.

  1. Confirm the installed edition with DISM.exe /Online /Get-CurrentEdition.
  2. Install the matching 25-character key.
  3. Start online activation.
  4. Verify the result with /xpr or /dlv.

Install the key:

cscript.exe %windir%System32slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Replace the example with your legitimate key, then request activation:

cscript.exe %windir%System32slmgr.vbs /ato

/ipk installs or replaces the product key. It does not, by itself, prove that Windows is activated. /ato asks Microsoft’s activation service to activate a retail installation or a system with a MAK installed.

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

You can also enter a key through the graphical interface: Start > Settings > System > Activation > Change product key.

Common product-key failures

Error Likely cause
0xC004F034 The key is invalid for the installed edition or version.
0xC004F210 The key does not match the installed Windows edition.
0xC004F00F The license type and installed edition are incompatible.
0xC004C008 The key has reached its permitted activation limit.
0xC004C003 The product key has been blocked.

A replacement motherboard or a new PC may also require a new key if the device has no transferable digital license.

Rank #2
SSK Portable SSD 500GB External Solid State Hard Drive USB C Up to 1050MB/s
  • Capacity Display Variance: 500GB external ssd often appears as around 465GB on Windows. MacOS can show full 500 GB capacity. This is binary calculation difference and doesn’t affect SSD hard drive actual physical storage
  • 1050 MB/s Speed: Instantly access to your files with blazing-fast 10Gbps external SSD read up to 1050MB/s and write up to 1000MB/s. LED Light indicates USB SSD instant activity
  • Data Security: Solid state drives S.M.A.R.T. health diagnostics​ and adaptive TRIM optimizing data block management ensures consistent write speeds and extends the longevity of the portable SSD
  • USB-C & USB-A Cable: Both cables featuring rapid USB 3.2 Gen2, this USB SSD effortlessly bridges devices, enabling seamless cross-platform file transfers and backup between computers, smartphones, tablets and iPhone
  • Always Fast: No slowdowns for large file transfers. With SLC caching (25% of current available capacity allocated as high-speed cache), this external SSD delivers steady 10Gbps for transfers within the cache capacity

4. Reactivate Windows 11 with an existing digital license

A digital license is associated with the device rather than being entered as a 25-character key. It may also be linked to your Microsoft account.

  1. Connect the PC to the internet.
  2. Sign in to the Microsoft account associated with the license.
  3. Open Start > Settings > System > Activation.
  4. If Windows is not activated, select Troubleshoot.

After Windows has detected the entitlement, you can request another activation attempt from CMD:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cscript.exe %windir%System32slmgr.vbs /ato

There is no CMD command that creates a digital license or retrieves one from Microsoft. If a digital license is not associated with the hardware or account, /ato cannot manufacture one.

After replacing major hardware

A motherboard replacement can cause Windows to lose its activation association. Use Start > Settings > System > Activation > Troubleshoot, then choose the option indicating that hardware was recently changed if it appears. This process works best when the original digital license was linked to your Microsoft account.

5. Activate Windows 11 with a KMS volume license

Key Management Service is intended for organizations with a properly licensed KMS host. It is not a free retail activation method.

A KMS client generally needs:

  • A supported volume edition such as Windows 11 Pro, Enterprise, or Education.
  • A reachable organizational KMS host.
  • Working DNS discovery or a manually specified KMS host.
  • At least 25 unique Windows client activation requests before a KMS host activates client devices.
  • Contact with the KMS host at least once every 180 days.

Install a KMS client setup key

Use the GVLK matching the installed edition. These public keys identify a device as a KMS client; they do not activate Windows on their own.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Edition GVLK
Pro W269N-WFGWX-YVC9B-4J6C9-T83GX
Pro N MH37W-N47XK-V7XM9-C7227-GCQG9
Pro for Workstations NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J
Pro for Workstations N 9FNHH-K3HBT-3W4TD-6383H-6XYWF
Pro Education 6TP4R-GNPTD-KYYHQ-7B7DP-J447Y
Pro Education N YVWGF-BXNMC-HTQYQ-CPQ99-66QFC
Education NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
Education N 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ
Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43
Enterprise N DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
Enterprise G YYVX9-NTFWV-6MDM3-9PT4T-4M68B
Enterprise G N 44RPN-FTY23-9VTTB-MP9BX-T84FV

For example, to configure Windows 11 Pro as a KMS client:

cscript.exe %windir%System32slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
cscript.exe %windir%System32slmgr.vbs /ato

Windows 11 Home is not listed because it is not a KMS volume-activation edition.

Specify the KMS host manually

If your organization supplied a KMS host name, configure it with:

Rank #3
Sale
Sandisk 1TB Extreme Portable SSD, Up to 2000MB/s Transfer Speeds-New Model
  • NEARLY 2X FASTER THAN OUR PREVIOUS GENERATION(8) – move 1,000 high-res photos in under 60 seconds(6) with up to 2000MB/s transfer speeds(2).
  • IP65 RATING AND UP TO 3M DROP PROTECTION(3) – protects against spills and drops.
  • POCKET-SIZED – fits easily in pockets and small bags.
  • SPACE TO OWN YOUR AI CONTENT – speed and capacity to download your high-res clips and photo edits.
  • 256-BIT AES ENCRYPTION(4) – helps keep private files secure with password protection.
cscript.exe %windir%System32slmgr.vbs /skms kms.example.com
cscript.exe %windir%System32slmgr.vbs /ato

The normal KMS TCP port is 1688. If your organization uses another port:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cscript.exe %windir%System32slmgr.vbs /skms kms.example.com:1688

Replace the example host with your organization’s actual server. To remove the manually configured host and return to DNS-based discovery:

cscript.exe %windir%System32slmgr.vbs /ckms

Troubleshoot KMS error 0xC004F074

This error usually means that the client cannot contact a suitable KMS host. Check DNS, firewall rules, the KMS service, and system time.

Test the KMS port from PowerShell:

Test-NetConnection -ComputerName <KMS-Host-Name> -Port 1688

Typical causes include a missing _vlmcs._tcp DNS record, blocked TCP port 1688, an incorrect host name, a stopped Software Protection service, or excessive time difference between the client and host.

6. Use Active Directory-based activation

Active Directory-based activation is another organization-only method. A domain-joined Windows client obtains an activation object from Active Directory Domain Services instead of contacting a KMS host directly.

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

Once the organization has configured the activation object and the PC can contact the domain infrastructure, no special installation command is normally required. To trigger an activation attempt after a licensing or domain change, run:

cscript.exe %windir%System32slmgr.vbs /ato

7. Activate through a Windows Enterprise subscription

Enterprise subscription activation is not a conventional product-key procedure. It can step a properly licensed Windows Pro or Pro Education installation up to Windows Enterprise or Education when the user, device, and Microsoft Entra configuration meet the licensing requirements.

Typical requirements include:

  • A supported, already activated Windows Pro or Pro Education installation.
  • A qualifying Windows Enterprise E3/E5 or Education A3/A5 user license.
  • The required Microsoft Entra ID identity and device-join state.
  • A supported Microsoft Entra-joined or hybrid-joined device for the applicable commercial scenario.

After the licensed user signs in with the associated Microsoft Entra credentials, Windows can perform the edition step-up without manually installing a GVLK or restarting. You can request an activation attempt with:

cscript.exe %windir%System32slmgr.vbs /ato

This command does not replace the subscription, identity, or device requirements.

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.
Rank #4
Sale
Samsung T7 Portable SSD 1TB Titan Gray, USB 3.2 Gen 2, Up to 1,050MB/s
  • MADE FOR THE MAKERS: Create; Explore; Store; The T7 Portable SSD delivers fast speeds and durable features to back up any endeavor; Build your video editing empire, file your photographs or back up your blogs all in an instant
  • SHARE IDEAS IN A FLASH: Don’t waste a second waiting and spend more time doing; The T7 is embedded with PCIe NVMe technology that brings fast read and write speeds up to 1,050/1,000 MB/s¹, making it almost twice as fast as the T5
  • ALWAYS MAKE THE SAVE: Compact design with massive capacity; With capacities up to 4TB, save exactly what you need to your drive – from large working files to game data and everything in between
  • ADAPTS TO EVERY NEED: Whether using a PC or mobile phone, count on the T7 for extensive compatibility²; It’s a true team player when it comes to heavy-duty application usage or file-saving
  • HI RESOLUTION VIDEO RECORDING: Record Ultra High Resolution (4K 60fs) videos directly onto the T7 Portable SSD with your favorite camera or mobile devices; Supports iPhone 15 Pro Res 4K at 60fps video and more³

8. Use telephone or offline activation

Telephone activation

For supported editions, open the telephone activation wizard by searching for:

SLUI 04

Select the result and follow the displayed instructions. Microsoft notes that Windows 11 Pro Education and Windows 11 Pro for Workstations must be activated over the internet and cannot use SLUI 04.

Volume or offline activation with an installation ID

For supported volume-licensing workflows, generate an installation ID:

cscript.exe %windir%System32slmgr.vbs /dti

After the activation service provides a confirmation ID, apply it with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cscript.exe %windir%System32slmgr.vbs /atp <Confirmation-ID>

/dti displays the installation ID; /atp uses the confirmation ID supplied by the activation service. These commands do not bypass licensing.

9. Find an embedded OEM key

Many manufacturer PCs store an original Windows key in firmware. Run this PowerShell command:

(Get-CimInstance -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

If the firmware contains an exposed key, PowerShell displays it. Blank output does not prove that the PC lacks a digital license; the device may have a digital entitlement instead.

You may still see this older command online:

wmic path softwarelicensingservice get OA3xOriginalProductKey

It is an older WMIC-based form. The current Microsoft-documented approach uses Get-CimInstance in PowerShell.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Commands that do not activate Windows

/rearm does not permanently activate Windows

cscript.exe %windir%System32slmgr.vbs /rearm

/rearm resets activation timers for deployment and imaging scenarios. It does not provide a license or permanently activate an unlicensed copy. It may also have no effect when the SkipRearm setting is enabled.

Best Value
Lexar ES3 1TB Portable SSD Silver, USB 3.2 Gen 2 up to 1050MB/s
  • Note: Magsafe is not available in this version
  • High-speed Data Transfer: Lexar external SSD ES3 supports USB 3.2 Gen 2 up to 1050MB/s read and 1000MB/s write to transfer files fast for more efficient work. (Performance may be lower if not supporting USB 3.2 Gen 2 on Mac and other systems)
  • Wide Compatibility: Lexar Portable SSD ES3 compatibility with iPhone 17 series (Not supported on iPhone 14 and older models), Android mobile devices, laptops, cameras, Xbox X|S, PS4, PS5, gaming console, and more
  • On The Go: Lexar external solid state drive ES3's thin, stylish, and durable design, weighs 42g and is only 10.5mm thick, making it smaller than a card and easily fits in your pocket. It comes with a Type-C cable for plug-and-play convenience
  • Data Safety First: Lexar SSD ES3 includes Lexar DataShieldTM 256-bit AES encryption software to protect files

/upk removes the installed key

cscript.exe %windir%System32slmgr.vbs /upk

This uninstalls the current product key. After a restart, Windows remains unlicensed until another applicable key is installed. Do not use it as a routine troubleshooting step.

/cpky only removes the key from the registry

cscript.exe %windir%System32slmgr.vbs /cpky

This removes the product key from the local registry to reduce the chance of key theft. It does not activate Windows or remove the license entitlement from Microsoft’s activation servers.

Verify activation after using any method

Always check the result rather than relying on a successful /ipk message:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cscript.exe %windir%System32slmgr.vbs /xpr
cscript.exe %windir%System32slmgr.vbs /dlv

An accepted /ipk command means that Windows installed a key applicable to the system. Actual activation still depends on Microsoft’s activation service, MAK authorization, a digital entitlement, or functioning KMS or Active Directory infrastructure.

Official Microsoft references

FAQ

Can CMD activate Windows 11 for free?

No. CMD can install a legitimate key or request activation for an existing digital license, MAK, KMS, or Active Directory entitlement. No command creates a valid license.

What is the command to activate Windows 11?

The general activation command is cscript.exe %windir%System32slmgr.vbs /ato. It only works when Windows already has an eligible digital license, product key, MAK, KMS configuration, or organizational activation entitlement.

Can I activate Windows 11 Home with a KMS key?

No. Windows 11 Home is not a KMS volume-activation edition. Use a valid Home product key or an existing digital license.

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

Why does /ipk succeed but Windows remain unactivated?

/ipk only installs the key. Activation still requires online authorization, a valid digital license, MAK availability, or a reachable KMS or Active Directory activation service. Check with /xpr and /dlv.

How often must a KMS client reactivate?

A KMS client must contact its organization’s KMS host at least once every 180 days. If it cannot, activation eventually expires.

Will /rearm activate Windows permanently?

No. /rearm resets activation timers for deployment scenarios. It does not provide a product key or license.

Can I recover my Windows product key from CMD?

For a firmware-embedded OEM key, use PowerShell: (Get-CimInstance -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey. Blank output does not rule out a digital license.

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

The Bottom Line

Use /ipk followed by /ato when you have a matching product key. Use /ato alone to retry an existing digital, Active Directory, Enterprise subscription, or already configured volume license. KMS commands are only appropriate for an organization with its own licensed KMS infrastructure. If no valid license or entitlement exists, CMD cannot legitimately activate Windows 11.

Quick Recap

SaleBestseller No. 3
Sandisk 1TB Extreme Portable SSD, Up to 2000MB/s Transfer Speeds-New Model
Sandisk 1TB Extreme Portable SSD, Up to 2000MB/s Transfer Speeds-New Model
IP65 RATING AND UP TO 3M DROP PROTECTION(3) – protects against spills and drops.; POCKET-SIZED – fits easily in pockets and small bags.
$261.29
Bestseller No. 5
Lexar ES3 1TB Portable SSD Silver, USB 3.2 Gen 2 up to 1050MB/s
Lexar ES3 1TB Portable SSD Silver, USB 3.2 Gen 2 up to 1050MB/s
Note: Magsafe is not available in this version
$179.99

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.