Windows 11 can be activated from an elevated Command Prompt, but Command Prompt is only the interface. The actual licensing work is performed by slmgr.vbs, a Windows script that installs product keys, starts activation, and reports license status.
The correct command sequence depends on your license: retail keys and MAK keys activate online, while KMS activation is intended for devices managed by an organization with access to its KMS host. A KMS client key is not a free substitute for a retail Windows license.
Before you start
Have a valid license that matches the Windows 11 edition installed on the PC. A Windows 11 Home key will not activate Windows 11 Pro, and installing a different key does not automatically change the installed edition.
To check the edition, open Settings > System > About and look under Windows specifications. You can also press Windows + R, enter winver, and select OK.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
- Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
- Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
- Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
- Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty
You should also have an internet connection for normal retail or MAK activation. If you are activating a work or school computer with KMS, connect it to the organization’s network or VPN as instructed by its administrator.
Open an elevated Command Prompt
- Open the Start menu and type Command Prompt.
- Right-click Command Prompt and select Run as administrator.
- Select Yes if User Account Control asks whether to allow the app to make changes.
The title bar should normally include Administrator:. The activation commands can fail with an access or elevation error when the window is not running with administrator privileges.
Activate Windows 11 with a retail key or MAK
The process has two separate stages: install the key with /ipk, then request activation with /ato. Installing a key alone does not activate Windows.
Step 1: Install the product key
In the elevated Command Prompt, replace the placeholder with your valid 25-character key:
Free tools Windows power users keep installed
One-click scans. No signup required.
cscript.exe %windir%system32slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
A product key consists of five groups of five characters. The /ipk option checks whether the key is valid and applies to the installed Windows edition. If another key is already installed, a valid replacement key replaces it.
Microsoft recommends restarting Windows or restarting the Software Protection service after installing a key. Restarting the computer is the simplest option. To restart the service from Command Prompt instead, run:
net stop sppsvc
net start sppsvc
Depending on the system state, Windows may display a confirmation dialog after the /ipk command. Close it and continue.
Step 2: Start online activation
Run:
cscript.exe %windir%system32slmgr.vbs /ato
The /ato option attempts online activation using the mechanism associated with the installed key. For a retail key or MAK, that normally means Microsoft’s activation service. For a KMS client key, it means contacting the organization’s KMS infrastructure.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #2
- High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
- Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
- Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
- Sleek, durable metal casing
- Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]
A successful attempt should produce a message indicating that Windows was activated successfully. If it does not, record the hexadecimal error code before trying additional changes.
Verify activation from CMD
Use these commands to confirm the licensing state:
| 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 license and activation details. |
cscript.exe %windir%system32slmgr.vbs /dlv all |
Detailed information for all installed editions and components. It also shows Activation ID values. |
cscript.exe %windir%system32slmgr.vbs /xpr |
Whether activation is permanent or has an expiration date. |
For a normal consumer installation, /xpr is useful because it quickly distinguishes a permanent activation from a time-limited volume activation. The detailed /dlv output is more useful on business-managed systems.
Activate a specific installed edition
Most users can run /ato without an additional parameter. If the computer has multiple installed editions or licensing components, first display their identifiers:
cscript.exe %windir%system32slmgr.vbs /dlv all
Find the Activation ID associated with the edition you want to target, then run:
cscript.exe %windir%system32slmgr.vbs /ato <Activation-ID>
The Activation ID is optional. Adding it limits the activation attempt to the corresponding Windows edition.
Retail, MAK, and KMS: which command applies?
| License type | How it activates | Who normally uses it |
|---|---|---|
| Retail | Install a matching retail key, then run /ato to contact Microsoft’s online activation service or an authorized activation method. |
Individuals and organizations with retail licenses. |
| MAK | Install the Multiple Activation Key with /ipk, then run /ato. The key activates directly against Microsoft’s activation services. |
Organizations using volume licensing. |
| KMS | Install a KMS client setup key and activate through the organization’s KMS host. | Organizations with a configured volume-activation service. |
A KMS client key is designed for volume licensing. It does not turn a retail Windows installation into a permanently licensed copy, and it will not activate a retail edition merely because /ato was run.
KMS activation from Command Prompt
Use this workflow only when your organization has supplied the KMS details and the PC is licensed for volume activation.
Step 1: Install the organization’s KMS client key
cscript.exe %windir%system32slmgr.vbs /ipk <KMS-Key>
Step 2: Configure a specific KMS host, if required
If your administrator provided a KMS host name, specify it with:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
- Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
- Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
- Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
- Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
cscript.exe %windir%system32slmgr.vbs /skms <KMS-host-name>:1688
TCP port 1688 is the standard KMS port used in Microsoft’s examples. The host name must resolve through the organization’s DNS, or the administrator must provide an explicitly reachable host.
KMS can also discover its host automatically through DNS. If the required DNS service record is missing, activation may fail with 0x8007232B, “DNS name does not exist.”
Step 3: Activate through KMS
cscript.exe %windir%system32slmgr.vbs /ato
Then verify the result:
cscript.exe %windir%system32slmgr.vbs /dlv
cscript.exe %windir%system32slmgr.vbs /xpr
KMS activation is not the same as permanent retail activation. It depends on the organization’s KMS service and periodic licensing communication. If the KMS host has not reached the required activation threshold, the client can report that the activation count is too low. Changing the command syntax will not fix that server-side condition.
Offline or telephone activation
If online activation is unavailable and Microsoft or your organization has directed you to use an offline process, display the Installation ID:
cscript.exe %windir%system32slmgr.vbs /dti
After completing the authorized telephone or offline activation process and receiving a Confirmation ID, apply it with:
cscript.exe %windir%system32slmgr.vbs /atp <Confirmation-ID>
Offline activation procedures can vary by license type and region. Use the instructions supplied by Microsoft or your organization’s license administrator rather than relying on an unverified activation service.
Common activation errors and fixes
“The product key is invalid” or the key is rejected by /ipk
The key may be mistyped, blocked, or intended for a different Windows edition. Check the installed edition under Settings > System > About, then use a key that matches it. Changing the product key does not upgrade Home to Pro or otherwise change the installed edition.
0xC004C003: product key blocked
Microsoft identifies a blocked MAK as one possible cause. An edition mismatch can also contribute to activation failure. If you have another valid, authorized MAK for the installed edition, install it with /ipk and retry /ato. Persistent failure requires the license administrator or Microsoft Support.
Rank #4
- GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
- BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
- EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
- TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
- WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.
0xC004C008: key cannot be used
This commonly means that the key’s activation limit or usage condition has been reached. Install the appropriate valid key and retry activation. If the message continues, the license owner or Microsoft must resolve the key’s usage status.
0x8007232B: DNS name does not exist
This is normally a KMS discovery problem. Connect to the organization’s network or VPN, confirm that DNS can locate the KMS service record, or configure the correct KMS host with /skms. Do not point the command at a random public server.
Activation fails because of network or firewall restrictions
MAK online activation needs access to Microsoft’s activation services. Check the internet connection and organizational firewall rules. If required, use Microsoft Activation Center procedures. KMS clients need network access to the organization’s KMS host, commonly over TCP port 1688.
The command says elevation is required
Close the window and reopen Command Prompt with Run as administrator. Under normal Windows settings, both /ipk and online /ato require elevation.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →How to translate a hexadecimal error
To display a description for an activation error, run the following command and replace the final placeholder with the code you received:
slui.exe 0x2a 0x <ErrorCode>
For example, preserve the hexadecimal format shown by Windows when entering the error code.
Commands that do not activate Windows
/ipkdoes not complete activation. It installs or replaces the product key. You still need/ato.- A public KMS key is not a permanent license. KMS keys require an eligible volume-license installation and access to a properly configured organizational KMS host.
/rearmis not an activation command. It resets activation timers in supported scenarios; it does not provide a license or permanently activate Windows./skmsis not a workaround for licensing. It only tells a volume-license client which KMS host to use./atodoes not always use Microsoft retail servers. It follows the activation method associated with the installed key, which may be retail, MAK, or KMS.
Short command checklist
For a valid retail or MAK key, the complete sequence is:
cscript.exe %windir%system32slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
cscript.exe %windir%system32slmgr.vbs /ato
cscript.exe %windir%system32slmgr.vbs /xpr
For an organization-managed KMS client:
cscript.exe %windir%system32slmgr.vbs /ipk <KMS-Key>
cscript.exe %windir%system32slmgr.vbs /skms <KMS-host-name>:1688
cscript.exe %windir%system32slmgr.vbs /ato
cscript.exe %windir%system32slmgr.vbs /dlv
Use the KMS version only when your organization has provided the KMS license and host information.
Recommended Free Tools
Best Value
- 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
- 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
- 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
- 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
- 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.
Microsoft documentation
For the complete list of slmgr.vbs options, see Microsoft’s Slmgr.vbs options. Microsoft also documents the volume activation workflow, KMS client activation keys, and troubleshooting for KMS DNS errors and MAK activation issues.
FAQ
Can I activate Windows 11 with CMD without a product key?
No. CMD and slmgr.vbs provide the command-line interface, but activation still requires a valid digital license or product key that matches the installed Windows edition.
Does slmgr /ipk activate Windows?
No. The /ipk option installs or replaces a product key. Run cscript.exe %windir%system32slmgr.vbs /ato afterward to request activation.
Can a KMS client key activate Windows 11 Home or a retail copy?
No. KMS client keys are intended for volume-licensing environments and require access to an organization’s KMS host. They are not retail licenses.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →How do I check whether Windows 11 is permanently activated?
Open an elevated Command Prompt and run cscript.exe %windir%system32slmgr.vbs /xpr. Windows will report whether activation is permanent or time-limited.
Why does Windows show error 0x8007232B?
The computer is generally trying KMS activation but cannot find the KMS host through DNS. Connect to the organization’s network or VPN, check DNS, or specify the correct KMS host with /skms.
The Bottom Line
The supported CMD workflow is straightforward: open an elevated Command Prompt, install a matching key with slmgr.vbs /ipk, trigger activation with slmgr.vbs /ato, and verify the result with /dli, /dlv, or /xpr. Retail and MAK activation use authorized online services; KMS requires an organization’s volume-license infrastructure. No command can replace a valid Windows license.
Quick Recap
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.

