How to Use the Slmgr Command in Windows (2024)

What to Know

  • Open Command Prompt and enter the desired slmgr command.
  • Check activation status: enter slmgr /xpr. View license info: enter slmgr /dlv. Reset timers, enter slmgr /rearm.
  • Use a similar format for other commands.

This article explains how to enter slmgr commands in Windows to turn on advanced Windows activation tasks.

Where to Enter Slmgr Commands

While Slmgr.vbs is stored in the System32 and SysWOW64 folders, commands that interface with the file need to be entered into Command Prompt.

How to Use the Slmgr Command in Windows (1)

Slmgr Command Examples

After opening Command Prompt, enter the desired slmgr command like you see in these examples:

Check Activation Status

slmgr /xpr

Use this slmgr command to see if Windows is activated. You'll see a message that says Windows is activated if it is, or be given a date if it's not permanently activated, or see an error if no product key has been provided.

A regular Command Prompt can work for some of these tasks but others—ones that involve changing data and not just displaying it—require an elevated Command Prompt.

View Current License Info

slmgr /dli

With this slmgr command, you’ll see part of the product key being used on your computer and an indication of whether the license is active. Other details are included here, too, like the KMS machine IP address, activation renewal interval, and other Key Management Services (KMS) information.

View Detailed License Info

slmgr /dlv

This command for slmgr.vbs reveals a lot more information about your computer. It starts off with the Windows version number and follows with the activation ID, extended PID, installation ID, remaining Windows rearm and SKU count, and a few other details on top of what the /dli option shows.

Reset Activation Timers

slmgr /rearm

The rearm command resets activation timers, which essentially lets you use Windows without activating it by extending the trial. For example, if you're using Windows on a 30-day trial, this one-month limitation can be reset back to the beginning after entering this slmgr command.

A restart of your computer is required to complete this command.

There's a limit to how many times you can rearm the Windows activation files. Check the rearm count with the /dlv command above to see how many cycles are left.

Remove Windows Product Key

slmgr /cpky

Use this slmgr command to remove the product key from Windows Registry. Doing this will not delete the key from your computer or un-activate Windows, but it will prevent key finder programs and malicious tools from being able to retrieve the key.

Activate Windows Online

slmgr /ato

This slmgr command forces Windows to try online activation, which is useful if you attempted normal activation steps (not using Slmgr.vbs) but received a connection problem or similar error.

Change Windows Product Key

slmgr /ipk 12345-12345-12345-12345-12345

Change the Windows product key with this slmgr command. Replace those numbers with the real product key, but be sure to include the dashes. Restart the computer to fully apply the new key.

If the key isn't correct, you'll see a message that The Software Licensing Service reported that the product key is invalid.

Change Remote Product Key

slmgr /ipk mattpc Matt P@ssw0rd 12345-12345-12345-12345-12345

This command is the exact same as the slmgr /ipk command shown above but instead of executing the change product key request on the local computer, it's performed on the machine named mattpc with the Matt admin users' login credentials.

Deactivate Windows

slmgr /upk

A fitting last example for the slmgr command in Windows is this one, which will uninstall the product key from the local computer. Just reboot your computer after you see the Uninstalled product key successfully message.

Slmgr Commands

The above examples are fairly basic and should be the only ones most people need to use. However, if you require more advanced options, take a look at the slmgr command syntax and the other supported options:

slmgr [MachineName [username [password]]] [option]

Slmgr Command Options
ItemExplanation
MachineNameThe machine to administer. Defaults to the local machine if omitted.
usernameThe username of an administrator account on the remote machine.
passwordThe password for username.
/atoActivate Windows license and product key against Microsoft's server.
/atp Confirmation_IDActivate the product with a user-provided Confirmation_ID.
/cdnsDisable DNS publishing by the KMS host.
/ckhcDisable KMS host caching.
/ckmsClear the name of KMS server used to default and port to default.
/cpkyDelete the Windows product key from Windows Registry.
/cpriSet the KMS priority to low.
/dliDisplay the current license information with activation status and partial product key.
/dlvDisplay additional license information. Similar to /dlibut more detailed.
/dtiDisplay Installation ID for offline activation.
/ipkkeyChange the Windows product key. Replaces the current product key if present.
/ilcfileInstall a license file.
/rilcReinstall system license files.
/rearmReset the evaluation period/licensing status and activation state of the computer. Use/rearm-appto specify an app, or/rearm-skufor a specific sku.
/skmsSet the Volume Licensing KMS server and/or the port used for KMS activation.
/skhcEnable KMS host caching (enabled by default). This blocks the use of DNS priority and weight after the initial discovery of a working KMS host.
/sai intervalSets the interval in minutes for unactivated clients to attempt KMS connection.
/spriSet the KMS priority to normal (default).
/sprt portSet the port on which the KMS host listens for client activation requests (default TCP port is 1688).
/sdnsEnable DNS publishing by the KMS host (default).
/upkUninstall the currently installed Windows product key and return the license status back to a trial state.
/xprShow the expiry date of the current license or indicate whether activation is permanent.

The MachineName option can't be used across platforms. For example, you can't manage Windows activation on a Windows 7 computer from a Windows Vista computer.

Slmgr Uses

Software Licensing Management Tool (slmgr) is a VBS file in Windows against which you can run commands to perform advanced Windows product activation tasks.

Slmgr.vbs is used only for the Windows operating system. Ospp.vbs manages volume licensing for Microsoft Office products.

FAQ

  • How do I open the command prompt?

    To open the command prompt in Windows 11 or 10, go to Start, type cmd, and select Command Prompt from the list.

  • How do I run the command prompt as an admin?

    Go to Start and type cmd. Right-click Command Prompt > Run as administrator. If you see a User Account Control window, select Yes to give permission to continue.

  • How do I clear the command prompt?

    To clear the Windows command prompt screen, type CLS > press Enter. This will clear the entire application screen. You can also close and reopen the command prompt to clear it.

Was this page helpful?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

How to Use the Slmgr Command in Windows (2024)

FAQs

How do I use Slmgr command in Windows 7? ›

Windows 7 has the same rearm command for delaying activation as Windows Vista …
  1. Step 1: Click Start, All Programs, Accessories. ...
  2. Step 2: Type the following command and press Enter: slmgr -rearm (note the space after slmgr and the hyphen in front of rearm.)
  3. Step 3: Restart Windows 7.
Aug 20, 2009

How to activate Windows 7 using CMD permanently? ›

Right click the Command Prompt listing and select “Run as Administrator”. This will launch the command prompt application with administrator privileges. Enter “slmgr -rearm” into the command line and hit ↵ Enter . A script will run and after a few moments you will be prompted to restart your computer.

How do I manually activate a Windows license? ›

Select the Start button, and then select Settings > Update & Security > Activation . Select Change product key. Type in the product key found on the COA and follow the instructions.

How do I activate Windows using Activator? ›

If you have a product key or digital license for your Windows 11 or 10, you can easily activate your copy of Windows by using the built-in Windows activator. You can easily find it from Settings. For Windows 10, you can click Start -> Settings -> Update & Security -> Activation.

What does Slmgr do in cmd? ›

Slmgr Uses

Software Licensing Management Tool (slmgr) is a VBS file in Windows against which you can run commands to perform advanced Windows product activation tasks.

How do I permanently activate Windows 10 with cmd? ›

How to Activate Windows 10/11 with CMD
  1. You have to open the command prompt on your system first. Then, click and start and simply type "CMD". Now, run it as administrator.
  2. Type the following command. slmgr /ipk. slmgr /skms kms.xspace.in. Slmgr /ato. Now press enter. This command will activate your Windows 10/11.
Oct 27, 2022

How do I permanently fix Windows 7 is not genuine? ›

Fix 2. Reset the Licensing Status of Your Computer with SLMGR -REARM Command
  1. Click on the start menu and type cmd in the search field.
  2. Type SLMGR -REARM and press Enter.
  3. Restart your PC, and you will find that the "This copy of Windows is not genuine" message no longer occurs.
Oct 27, 2022

How do I repair Windows 7 with command prompt? ›

Run CHKDSK in Windows 7 before Boot
  1. Start your computer, press and hold F8 until you see the Advanced boot options window. Select Repair your computer and hit Enter.
  2. Here you will see the System Recovery Options window, click “Command Prompt”.
  3. In the Command Prompt window, type “chkdsk /f/r” and Press the “Enter” key.
Dec 27, 2022

How do I permanently activate Windows 7? ›

Activate Windows 7
  1. Select the Start button. , right-click Computer, select Properties, and then select Activate Windows now.
  2. If Windows detects an internet connection, select Activate Windows online now. ...
  3. Enter your Windows 7 product key when prompted, select Next, and then follow the instructions.

How to activate Windows 10 using Slmgr? ›

Use the command “slmgr /ipk yourlicensekey” to install a license key (yourlicensekey is the activation key that corresponds to your Windows edition). The following is the list of Windows 10 Volume license keys. Note: You need to hit [Enter] key to execute commands.

What can I do if my Windows is not activated? ›

Here's what you can't do in the non-activated version of Windows 10:
  1. Change desktop wallpaper. Users without an activated instance won't be able to customize the background of Windows 10. ...
  2. Customize colors. ...
  3. Customize the lock screen. ...
  4. Apply Windows 10 themes.

How do I activate Windows license without product key? ›

One of the first screens you'll see will ask you to enter your product key so you can “Activate Windows.” However, you can just click the “I don't have a product key” link at the bottom of the window and Windows will allow you to continue the installation process.

Can Windows activate in BIOS? ›

The key for the version of Windows the PC comes with, is stored in the computer's UEFI firmware or BIOS. You don't even need to know it — assuming you're installing the same edition of Windows the PC came with, it should automatically activate and work without you needing to enter a key. It'll all happen automatically.

How to check Windows license using CMD? ›

The Short Version
  1. Press the Windows key and R keys simultaneously.
  2. Type cmd in the run box dialogue you have summoned, and hit the enter key.
  3. In the resulting cmd.exe window, type “wmic path softwareLicensingService get OA3xOriginalProductKey” without the quotation marks.
Jul 1, 2022

How do I manage a device using CMD? ›

Let's explore how you can access the Device Manager using the Command Prompt:
  1. Press Win + R to open the Run command dialog box.
  2. Type CMD and press Ctrl + Shift + Enter to open an elevated Command Prompt.
  3. Type devmgmt. msc and press Enter to open the Device Manager.
Dec 25, 2021

How to check Windows activation key using CMD? ›

Run Command Prompt as administrator, type “wmic path softwarelicensingservice get OA3xOriginalProductKey” into Command Prompt, and then hit Enter to find your Windows 10 product key. The command will only display a product key if your computer came with Windows 10 pre-installed.

How do I run CMD as administrator permanently? ›

Always open Command Prompt as administrator
  1. Open Windows Terminal.
  2. Click the menu button next to the new tab and select the Settings option.
  3. Under the “Profiles” section, click on Command Prompt.
  4. Turn on the “Run this profile as Administrator” toggle switch to run Command Prompt elevated automatically.
Jul 29, 2022

How do I activate Windows 10 for free permanently? ›

After you enter into Windows 10 Command Prompt, you can copy and paste this command line: slmgr. vbs /upk, in the Command Prompt window. Hit Enter to execute the command.

How to crack Windows password using CMD? ›

Easy Steps to Use CMD to Crack Administrator Password

Step 1: Launch the CMD from Windows recovery disk or the other admin account. Step 2: Type in the "net user" command. It will show you all the accounts on your PC. Step 3: See the admin account whose password you want to crack.

How do I restore a genuine Windows? ›

In the Control Panel search box, type recovery. Select Recovery > Open System Restore. In the Restore system files and settings box, select Next. Select the restore point that you want to use in the list of results, and then select Scan for affected programs.

How to find Windows 7 product key? ›

Locate your product key for Windows 7 or Windows 8.1

Generally, if you bought a physical copy of Windows, the product key should be on a label or card inside the box that Windows came in. If Windows came preinstalled on your PC, the product key should appear on a sticker on your device.

What happens if Windows 7 is not activated? ›

In addition, Windows 7 does not perform any system updates after the grace period. Finally, Windows will automatically turn your screen background image to black every hour – even after you change it back to your preference. This behavior continues until you successfully activate Windows 7.

How do I fix a corrupted boot drive? ›

To repair the boot sector, you can run the /fixboot command with bootrec.exe in a command prompt. This command will write a new boot sector to the system partition.

How do I force a Windows repair? ›

How to initiate startup repair using the Settings app in Windows
  1. Open the Settings app. ...
  2. Go to Update & Security.
  3. Select the Recovery tab.
  4. Under Advanced Startup, click Restart Now.
  5. After the computer reboots, go to Troubleshoot > Advanced Options > Startup Repair.
Jan 3, 2022

How do I force a system repair? ›

How to initiate startup repair from the desktop or lock screen
  1. Click Start.
  2. Click the power button icon.
  3. Press and hold down the Shift key and then click Restart. ...
  4. Select Troubleshoot.
  5. Go to Advanced Options > Startup Repair.
  6. After the startup repair process is complete, reboot the computer.
Jan 3, 2022

Will Windows 7 work without activation? ›

If you choose not to activate Windows, the operating system will go into what is called Reduced Functional mode. Meaning, certain functionality will be disabled.

How long can Windows stay unactivated? ›

Users can utilize an unactivated Windows 10 without any restrictions for one month after installing it. However, that only means the user restrictions come into effect after one month. Thereafter, users will see some Activate Windows now notifications.

Is activating Windows with CMD safe? ›

Yes… its safe but its depends upon you which windows activator you are using. some time we try to download windows activator from random source and there may be chances of viruses enter in your system. so follow best one. if you found in suspicious execution terminate your process and disconnect from internet.

How do you force install Windows 10 using CMD? ›

Type diskpart in the Run box and then click OK to run Diskpart for Windows 10 install.
...
Type the following commands one at a time and press Enter after each command:
  1. list disk.
  2. select disk 1.
  3. clean.
  4. create partition primary.
  5. select partition 1.
  6. active.
  7. format fs=ntfs quick (or format fs=fat32 quick)
  8. assign letter=X.

Why is my Windows 10 activation key not working? ›

Run an SFC Scan. Windows 10 activation issues could happen due to corrupted system files. So, a System File Checker (SFC) can resolve this problem.

How to activate Windows 10 with regedit? ›

I suggest you to follow the steps below and check if it helps.
  1. Press Windows key + letter 'R. ...
  2. Type "regedit" in the Run window box and hit OK.
  3. Navigate to HKLM/Software/Microsoft/Windows/Current Version/Setup/OOBE.
  4. Find "MediaBootInstall" on the right pane.
  5. Double click that and change value from a 1 to a 0.
Apr 3, 2016

Is it illegal to use unactivated Windows? ›

Installing Windows without a license is not illegal, activating it through other means without an officially purchased product key is illegal.

How do I fix Windows license expired without product key? ›

How to fix this error?
  1. Restart the Windows Explorer Process.
  2. Group Policy Edit.
  3. Edit Window Registry.
  4. Find the Product Key using Command Prompt.
  5. Disable Two Windows Services.
  6. Using Activation Troubleshooter.
  7. Check Your Date and Time.

How do I force Windows to boot from BIOS? ›

You can use any of these methods:
  1. Boot the PC, and press the manufacturer's key to open the menus. Common keys used: Esc, Delete, F1, F2, F10, F11, or F12. ...
  2. Or, if Windows is already installed, from either the Sign on screen or the Start menu, select Power ( ) > hold Shift while selecting Restart.
Dec 15, 2021

Can I get Windows 10 key from BIOS? ›

If you need to find the product key for your Windows 10 installation, you've got a few options. The key can be retrieved via the BIOS i.e. the bootloader of your system or the command window. You can also use external software to retrieve your Windows 10 key.

How do I activate Windows on my motherboard? ›

To use the Activation troubleshooter:
  1. Sign in as an administrator. ...
  2. Select the Start button, then select Settings > System > Activation > Troubleshoot . ...
  3. Select I changed hardware on this device recently, then select Next.
  4. Enter your connected Microsoft account and password, then select Sign in.

How do I activate activator on Windows 7? ›

Activate Windows 7
  1. Select the Start button. , right-click Computer, select Properties, and then select Activate Windows now.
  2. If Windows detects an internet connection, select Activate Windows online now. ...
  3. Enter your Windows 7 product key when prompted, select Next, and then follow the instructions.

How do I repair Windows 7 with Command Prompt? ›

Run CHKDSK in Windows 7 before Boot
  1. Start your computer, press and hold F8 until you see the Advanced boot options window. Select Repair your computer and hit Enter.
  2. Here you will see the System Recovery Options window, click “Command Prompt”.
  3. In the Command Prompt window, type “chkdsk /f/r” and Press the “Enter” key.
Dec 27, 2022

How do I fix Windows 7 not recognized as an internal or external command? ›

We have listed fixes for both versions of the error, so follow the relevant one to your case.
  1. Verify if the Program Is Installed. ...
  2. Use the Full File Path to Execute the Command. ...
  3. Use the Full File Path Within Double Quotes. ...
  4. Add the File Path to the Windows Environment Variables. ...
  5. Move Files to System32 Folder.
Aug 5, 2022

How do I permanently activate Windows 7 without product key? ›

How to Activate Windows 7 Without Product Key
  1. Visit the start menu and search CMD.
  2. Right-click on the option and run it as administrator.
  3. After the Command Prompt window opens, enter the command “slmgr -rearm”.
  4. The PC will ask you to restart the PC. ...
  5. After the PC restarts, run CMD as administrator again.
Jan 3, 2023

Can I activate Windows using CMD? ›

On a client computer, open a Command Prompt window and run the command Slmgr. vbs /ato . The /ato command causes the operating system to attempt activation by using whichever key has been installed in the operating system. The response should show the license state and detailed Windows version information.

Why won't my PC let me activate Windows? ›

If you have one copy of Windows and you installed it on more than one PC, activation might not work. The product key has already been used on more PCs than allowed by the Microsoft Software License Terms. To activate new additional PCs, you must buy a new product key or copy of Windows for each one.

How do I fix a corrupted boot in Windows 7? ›

Using Advanced Boot Options

Restart your computer. Press F8 before the Windows 7 logo appears. At the Advanced Boot Options menu, select the Repair your computer option. Press Enter.

How do I fix a corrupted Windows 7? ›

Running SFC scannow on Windows 10, 8, and 7
  1. Enter the command sfc /scannow and press Enter. Wait until the scan is 100% complete, making sure not to close the Command Prompt window before then.
  2. The results of the scan will depend on whether or not the SFC finds any corrupted files. There are four possible outcomes:
Jan 14, 2021

How to fix Windows 7 boot failure? ›

  1. Verify the Computer Finishes Initial Power-Up (POST) ...
  2. Unplug All External Devices. ...
  3. Check for Specific Error Messages. ...
  4. Reset the BIOS to Default Values. ...
  5. Boot to the Hard Drive Using the One-Time Boot Menu. ...
  6. Run a Computer Diagnostic. ...
  7. Boot the Computer into Safe Mode. ...
  8. Attempt to Boot to the Last Known-Good Configuration.
Feb 21, 2021

How do I fix inaccessible boot device with CMD? ›

Firstly, you need to open Command Prompt as an administrator. To do so, press the Windows key, type cmd, right-click on the result and choose Run as administrator. Within the Command Prompt app, type chkdsk /f /r and press Enter. Wait for the app to process your input, then type Y and press Enter.

What can I do if Windows 7 doesn't recognize my device? ›

In this article
  1. Symptoms.
  2. Cause.
  3. Resolution 1 - Uninstall and then reconnect the external hard drive.
  4. Resolution 2 - Install hotfixes that resolve issues that may exist on Windows 7.
  5. Resolution 3 - Install the latest Windows Updates.
  6. Resolution 4 - Reinstall USB controllers.
Sep 24, 2021

How do I fix operating system not booting? ›

Our advice is to start with the easiest fixes and, in order, move to the harder ones.
  1. Try Windows Safe Mode. ...
  2. Check Your Battery. ...
  3. Unplug All Your USB Devices. ...
  4. Turn Off Fast Boot. ...
  5. Check Your Other BIOS/UEFI Settings. ...
  6. Try a Malware Scan. ...
  7. Boot to Command Prompt Interface. ...
  8. Use System Restore or Startup Repair.
Jul 7, 2021

How do I make Windows 7 genuine permanently? ›

How do I make my Windows 7 genuine?
  1. Uninstall KB971033 Update.
  2. Use SLMGR -REARM Command.
  3. Turn off the Windows Automatic Update.
  4. Register Windows Genuine.
Jan 11, 2023

Top Articles
Latest Posts
Article information

Author: Carlyn Walter

Last Updated:

Views: 5936

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Carlyn Walter

Birthday: 1996-01-03

Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

Phone: +8501809515404

Job: Manufacturing Technician

Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.