How to Use Slmgr to Change, Remove, or Extend Your Windows License

Windows includes a built-in licensing management tool called Software Licensing Management Tool (Slmgr) that allows administrators and advanced users to manage product keys and activation settings directly from the Command Prompt. While most users activate Windows through the Settings app, Slmgr provides additional control over licensing functions such as installing a new product key, removing an existing license, checking activation status, viewing license details, extending evaluation periods, and activating Windows manually.

Slmgr is especially useful when migrating licenses between computers, troubleshooting activation problems, replacing an incorrect product key, preparing systems for deployment, or managing volume licensing environments. The tool works through command-line commands executed with administrative privileges and supports most modern versions of Windows, including Windows 10 and Windows 11.

Update Windows Drivers

Because licensing commands directly affect Windows activation, it is important to use them carefully. Entering incorrect commands or removing valid product keys without understanding the consequences can cause Windows to become unactivated. Fortunately, most Slmgr operations are straightforward when performed correctly.

PC running slow or unstable? Do you want to update drivers?

This guide explains how to use Slmgr to change, remove, activate, verify, and extend Windows licenses safely in Windows 11.

What Is Slmgr?

Slmgr stands for Software Licensing Management Tool. It is a Windows script that communicates with Microsoft’s licensing services and allows administrators to manage activation settings through Command Prompt or PowerShell.

Common tasks performed with Slmgr include:

  • Viewing activation status
  • Displaying license information
  • Installing a new product key
  • Removing an existing key
  • Activating Windows
  • Checking license expiration dates
  • Rearming evaluation licenses
  • Troubleshooting activation issues

The tool is built directly into Windows and requires no additional downloads.

Open Command Prompt as Administrator

Before running Slmgr commands, open an elevated Command Prompt.

Steps

  1. Press Windows + S.
  2. Type:
cmd
  1. Right-click Command Prompt.
  2. Select Run as Administrator.
  3. Click Yes if prompted by User Account Control.

Alternatively, you can use Windows Terminal with administrative privileges.

Check Windows Activation Status

Repair PC

One of the most commonly used Slmgr commands displays whether Windows is currently activated.

Command

slmgr /xpr

After running the command, Windows displays a popup indicating whether the system is permanently activated or showing an expiration date if applicable.

Example Result

The machine is permanently activated.

When to Use

  • Verify activation status
  • Check evaluation expiration
  • Confirm license validity
  • Troubleshoot activation issues

View Detailed License Information

PC running slow or unstable? Do you want to update drivers?

If you need more information about the installed Windows license, use the detailed license display command.

Command

slmgr /dlv

This command provides extensive activation details including:

  • Activation ID
  • Application ID
  • Product key channel
  • License status
  • Remaining activation count
  • Partial product key
  • Activation expiration information

Why It’s Useful

System administrators often use this command when diagnosing activation problems or verifying licensing configurations.

View Basic License Information

For a shorter summary of license information, use:

slmgr /dli

This displays:

  • Windows edition
  • Activation status
  • Partial product key
  • License type

It provides essential information without displaying the extensive details shown by /dlv.

Install or Change a Windows Product Key

PC running slow or unstable? Do you want to update drivers?

If you have purchased a new Windows license or need to replace an existing product key, Slmgr allows installation directly from Command Prompt.

Command

slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Replace the X characters with your actual product key.

Example

slmgr /ipk ABCDE-FGHIJ-KLMNO-PQRST-UVWXY

After entering the command successfully, Windows displays a confirmation message indicating that the product key has been installed.

Common Reasons to Change a Product Key

  • Upgrading Windows edition
  • Replacing an invalid key
  • Migrating licenses
  • Correcting activation errors
  • Deploying corporate licenses

Important Note

Always ensure the product key matches your Windows edition. Installing a key intended for a different edition may cause activation failures.

Activate Windows After Installing a Key

Installing a product key does not always activate Windows automatically. After entering the key, manually activate the operating system.

Command

slmgr /ato

The command contacts Microsoft’s activation servers and attempts to activate Windows using the installed license key.

Requirements

  • Active internet connection
  • Valid product key
  • Compatible Windows edition

Successful Activation Message

Product activated successfully.

Troubleshooting

If activation fails:

  • Verify internet connectivity
  • Confirm key validity
  • Check system date and time
  • Ensure edition compatibility

Remove the Installed Product Key

There may be situations where you need to remove the current Windows license from a system. For example, before transferring ownership or moving a retail license to another device.

Command

slmgr /upk

UPK stands for Uninstall Product Key.

After execution:

  • Product key is removed
  • Windows becomes unlicensed
  • Activation status changes

Common Uses

  • Preparing computers for resale
  • License migration
  • Deployment preparation
  • Removing incorrect keys

Important Warning

Once removed, Windows may enter an unactivated state until a new valid license is installed.

Remove Product Key from Registry

Even after uninstalling a key, portions of licensing information may remain stored locally. To clear the product key from the registry:

Command

slmgr /cpky

CPKY stands for Clear Product Key from Registry.

Benefits

  • Enhances security
  • Prevents key extraction tools from retrieving the key
  • Useful before selling a PC
  • Protects licensing information

Run this command after:

slmgr /upk

for complete removal of licensing information.

Extend a Windows Evaluation License

Organizations and IT professionals often use evaluation versions of Windows for testing purposes. These versions typically have expiration periods.

Slmgr can extend the evaluation period using the rearm command.

Command

slmgr /rearm

What Rearm Does

  • Resets activation timers
  • Extends evaluation period
  • Refreshes licensing state
  • Provides additional testing time

After Running the Command

Restart the computer for changes to take effect.

Verify Remaining Evaluation Time

Run:

slmgr /dlv

and review remaining rearm counts.

Important Note

Modern Windows versions limit the number of rearms available. Once exhausted, the command will no longer extend the evaluation period.

Check License Expiration Date

If you suspect your Windows license may expire, check its expiration information.

Command

slmgr /xpr

Possible results include:

The machine is permanently activated.

or

Windows will expire on:
Date and Time

This is particularly useful in enterprise and evaluation environments.

Common Slmgr Commands Summary

CommandFunction
slmgr /xprCheck activation expiration
slmgr /dliDisplay license information
slmgr /dlvDisplay detailed license details
slmgr /ipk KEYInstall product key
slmgr /atoActivate Windows
slmgr /upkUninstall product key
slmgr /cpkyRemove key from registry
slmgr /rearmExtend evaluation period

Troubleshooting Slmgr Problems

Command Not Working

Ensure Command Prompt is running as Administrator.

Activation Fails

Verify:

  • Internet connectivity
  • Product key validity
  • Correct Windows edition
  • Date and time settings

Error Messages Appear

Use:

slmgr /dlv

to gather detailed licensing information for diagnosis.

Activation Servers Unavailable

Wait and try again later or use the Activation Troubleshooter:

  1. Open Settings.
  2. Navigate to System > Activation.
  3. Select Troubleshoot.

Security Considerations

When working with product keys:

  • Never share keys publicly.
  • Avoid storing keys in unsecured files.
  • Remove licenses before selling devices.
  • Use /cpky after uninstalling keys.
  • Keep backup records of legitimate licenses.

Final Thoughts

The Software Licensing Management Tool (Slmgr) is one of the most powerful built-in utilities for managing Windows activation and licensing. Whether you need to install a new product key, activate Windows manually, remove an existing license, verify activation status, or extend an evaluation period, Slmgr provides direct control through simple command-line operations.

For most users, the most important commands are slmgr /ipk for installing a new product key, slmgr /ato for activation, slmgr /upk for license removal, and slmgr /xpr for checking activation status. Combined with Windows’ built-in activation tools, these commands make troubleshooting and managing Windows licenses significantly easier.

By understanding how Slmgr works and using its commands carefully, you can efficiently manage Windows licensing on personal computers, business systems, and testing environments running Windows 11.

PC running slow or unstable? Do you want to update drivers?

GeeksDigit.Com
Logo