Contacts

How to change, remove or renew your Windows license. How to activate Windows7 so that activation never crashes Slmgr dlv what the command does

KMS. How to manually activate Windows

Microsoft offers two types of activation for its products - MAK (Multiple Activation Key) and KMS (Key Management Service).

Sometimes for different Windows reasons does not want to be activated on a network that has a running KMS server.

To activate manually, you must execute 3 consecutive commands in Command line. Command line launch as administrator



Enabling activation with normal access

A source:
https://technet.microsoft.com/ru-ru/library/bb490214.aspx

By default, activation requires administrator rights. However, in cases where users do not have local administrator access rights and automatic activation cannot be performed within the first 30 days grace period, clients can grant the right to perform these operations to users with normal access.

To allow users with normal access rights to install product keys, perform activation and retooling computers, registry entry value

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ W indows NT \ CurrentVersion \ SL \ UserOperations (REG_DWORD)

Need to install equal to 1.

After enabling this registry key, all product key installation, activation, and retooling requests must be executed using the script Slmgr.vbs.

Additionally

There is also a lot of information on this topic on Microsoft.com sites, for example.

Sometimes, for various reasons, Windows activation fails. The licensed status of such a system becomes “ Non-genuine ". The reasons may be different: installing several new devices, sometimes just virtual ones, installing some programs, drivers, ending the trial period. In that Windows case makes the desktop wallpaper black and displays a scary message like “Your copy of windows is not genuine "," You may have been a victim of a counterfeit ... "and the like. In this case, you can start over. trial period Initial Grace Period. This procedure is called rearm. It is performed using the command slmgr.vbs / rearm issued from the command line in privileged mode (with administrator rights). You can reset the trial period only three times, after each special counter decreases by one. Ultimately, a situation may arise when the rearm count is zero, and the license status is still " Non-genuine " or some mistake. In this state, it cannot be connected to the KMS server, change the activation key, etc.

In this case, the solution to the problem may be to delete the registry hive responsible for licensing. The operating system will recreate it when it boots in the Initial Grace Period state. The existing key will be lost in this case, but it doesn't matter.

The problem is that this registry hive is protected from modification / deletion and this can only be done from the mode Windows recovery when the registry is disabled.

To reset the rearm count, do the following:

Create at the root system disk bat file reset-rearm.bat with the following content:

Reg load HKLM \ MY_SYSTEM "% ~ dp0Windows \ System32 \ config \ system" reg delete HKLM \ MY_SYSTEM \ WPA / f reg unload HKLM \ MY_SYSTEM Restart your computer and press F8. Select "Troubleshoot computer problems", then - keyboard layout, enter the local administrator password and you will be taken to the command line screen. The current path will be "X: \ Windows \ system32". Go to the root of the system drive (for Windows 7 it will be drive D) with the "D:" command, you can check for the presence of the reset-rearm.bat file in the root with the dir command. Run the reset-rearm.bat file. Reboot normally. Windows will inform you that no activation key was found. In order to enter the key re-open command line in administrator mode and run the command slmgr.vbs / ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX, where instead of X, enter your activation key or KMS public key for the corresponding operating system: Windows 7 Professional FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 Windows 7 Enterprise 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH Windows Server 2008 R2 Standard YC6KT-GKW9T-YTKYR-T4X34-R7VHC Windows Server 2008 R2 Enterprise 489J6-VHDMP-X63PK-3K798-CPX3Y Windows Server 2008 R2 Datacenter 4YFP-3QFB3-KQT8W-PMXWJ-7M648 period "with the number of resetting the counter equal to 4.

This article is based on Daniel Mitchell's blog http://www.daniel-mitchell.com/blog/reset-windows-7-rearm-count/

Without activation for 120 days.

Upon expiration of the activation period, launching the shell \ Windows \ explorer.exe will be banned.

A window will appear Windows Activation with a message “Activate Windows now. The activation period has expired, Windows more does not work. To use Windows, you need to activate this copy of Windows ".

In this case, the options are available:

Activate Windows over the network;

Access from disabilities(this will allow you to purchase a product key online);

Re-enter product key.

***

How to reset the activation counter

Select an option Disabled Access;

- a web browser will open;

- in the window "The web page is not available in offline» click Offline;

- in the address bar of the browser enter C: \ Windows \ System32 \ cmd.exe(if operating system is not installed on the C: \ drive, enter the appropriate drive letter), click Enter;


- a window will appear File Upload - Security Warning with a message “Run or save this file? (Name: cmd.exe. Type: Application, 294 KB. From: C: \ Windows \ System32) ", click Run;


- a window will appear « Internet Explorer- Security Warning" with a message “Couldn't verify this publisher. Are you sure you want to run this program? Name: cmd.exe. Publisher: Unknown publisher. This file does not have a valid digital signature to confirm its publisher. You should run programs obtained only from a trusted publisher ", click Run;

- in the window after prompting the system C: \ Users \ username \ Desktop> enter slmgr.vbs / rearm(or simply slmgr / rearm), press Enter;

- in the window that appears Windows Script Host with a message “Execution of the command completed successfully. Restart your computer for the changes to take effect " click OK;

- close the windows , web browser, activation window Windows;

- reboot (if after reboot the activation window appears again, turn off and turn it back on).

***

Activation mechanism settings stored in REG_DWORD-parameters of sections :

:

VLActivationInterval- determines the total period of work without activation (the default value is dword: 00000078, that is, 120 days);

SkipRearm- determines whether it will be allowed to reset the activation counter using the command slmgr.vbs / rearm after 4 resets (default value - dword: 00000000);

:

ActivationInterval- determines the interval for displaying the notification about the activation of the operating system (the default value is dword: 000dbba0);

NotificationDisabled- displaying a notification about the need to activate the operating system in the notification area Taskbars(the default is dword: 00000000... If you set the value 1 , no notifications will be displayed).

Notes (edit)

1.With a web browser, you can run any program Windows.

2. slmgr.vbs(script file VBScript; file disk address - \ Windows \ System32 \) is Software Licensing Management Tool .

Usage: slmgr.vbs [Computer Name [User Password]] [

Computer Name- The name of the remote (- local);

- recording with the required privileges on the remote;

Password- the password of the mentioned entry.

Main file keys:

/ ipk<Ключ продукта> - installation of a product key (replacement of an existing key);

/ ato [activation id] - activation Windows;

/ dli [activation ID | All] - displaying information about the license ( - current license);

/ dlv [activation ID | All] - display of detailed information about the license ( - current license);

/ xpr [activation id] - expiration date for the current state of the license;

Whether you like it or not, but Windows licensing Server is more important to Windows Server 2008 than ever. It is very important to know how to license your Windows 2008 Servers from the command line, see how much time is left before the license expires, and how to uninstall the license. In this article, we will take a look at how to use the command line tool from Microsoft to do all of the above ‘this is the slmgr.vbs tool.

What is slmgr.vbs?

The command line tool from Microsoft is slmgr.vbs. The name of the instrument is an abbreviation for Windows Software Licensing Management Tool.

This is a visual baseline script used to set up licensing for any Windows 2008 Server ‘be it full version or the core version. To see what slmgr.vbs can do, just run the interpreter Windows commands (cmd in the Run line) and enter:

Slmgr.vbs /?

Figure 1: Help window for slmgr.vbs

This will open a help window containing all the options available in slmgr.vbs. The various tasks that can be performed using slmgr.vbs are:

  • Manage licensing not only on the local server, but also on remote Windows 2008 Servers over the network. This requires a username and password. The default machine, unless otherwise specified, is the localhost (localhost).
  • Installing product keys using the ‘ipk.
  • Activating Windows 2008 with the 'ato.
  • Display licensing information using the ‘dli.
  • Display detailed licensing information using the ‘dlv.
  • View the expiration date of a Windows license using the ‘xpr option.
  • Clearing the current keys Windows product from system registry for security reasons using the ‘cpky.
  • Installing a license using the ‘ilc option.
  • Reinstallation system files licenses with the option 'rilc.
  • Reactivating a Windows Evaluation License using the 'rearm.
  • Removing a specific product key using the ‘upk option.
  • Displays the installation ID used by Microsoft for telephone activation using the ‘dit.
  • Finally, activating a product with a confirmation ID using the 'ato.

Let's take a look at examples of how Windows 2008 slmgr.vbs can help us.

How can slmgr.vbs help with an evaluation license?

If you are evaluating Windows Server 2008, you should know that license activation is not required. Evaluation Windows version Server 2008 will run for 60 days. While many administrators are unaware, it is possible to renew the evaluation period for another 60 days, this can be done three times. So you can evaluate Windows 2008 Server for 240 days, or about 8 months ‘wow!

You can use slmgr.vbs to resume the evaluation version of Windows 2008. To do this, you just need to enter:

Slmgr.vbs -rearm

Figure 2: Results after resuming an evaluation copy of Win 2008 for another 60 days

To see how much time you have left before the current evaluation copy expires, simply enter:

Slmgr.vbs -xpr

Figure 3: Results from the xpr command showing the day and time of the expiry date of the evaluation version of Win 2008

How do I get detailed information about my Windows Server 2008 license?

To get more detailed information rather than just the license expiration date (which the xpr command provides), one can use dli or dlv options. Here's what the results of using them look like:

Figure 4: Output from slmgr.vbs' dli

As you can see from the output of the ‘dli command, there is information about the version of the Win 2008 server being used, the license status, the remaining time, everything about the key management server.

Figure 5: Results of the slmgr.vbs ‘dlv command

The 'dlv command provides even more detailed information about the current state of the license.

How do I activate my license on Windows 2008 Server Core?

As I said before listing the options, slmgr.vbs is used to activate Windows 2008 Server from the command line. And on Windows Server Core, which has only a command interpreter, you have to use slmgr.vbs to activate the Core server from the command line. Therefore, it is very important to know how to use slmgr.vbs if you have Windows Server Core. But in my opinion, still, every administrator should know the basics of using this script.

So, let's say you just installed a new Windows Server 2008 Core server and want to activate it. Let's say you entered your product key during installation. To activate your OS, simply enter:

Slmgr.vbs -ato

If your network is not configured yet, or there is another error, you should see a window like:

Figure 6: Error in slmgr license activation

In my case, I got an error because I have not yet configured the IP address on the Win 2008 server Core Server... And then I got the error again because I hadn't configured the DNS and default gateway settings. It should be borne in mind that all these things are necessary for the successful activation of Windows 2008!

If you did not enter a product key during installation, you can enter it into slmgr.vbs from the command interpreter:

Slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

(assuming you have a MAK key, not a KMS key)

Here you can try to execute automatic activation again.

Figure 7: Successful activation of Windows 2008 using slmgr.vbs

If everything went well (as I finally did), you should see a window indicating successful product activation (Figure 7). Hooray!

How to manage Windows 2008 Server remote server licensing using slmgr.vbs?

As I said earlier, you can work not only with licenses local servers, but also remote servers Win 2008 Servers from the command line using slmgr.vbs. You just need the hostname of the server (hostname / IP address), as well as the admin username and password.

To do this, simply place the machine name (machinename), then the username (username), and then the password between the slmgr command and options as follows:

slmgr.vbs server2 administrator MyPassWord1 -xpr

The note: You don't need to use .vbs extension of the slmgr command. It will work fine even if you just type slmgr and command options.

Conclusion

Windows Server licensing is critical to the functioning of Windows 2008 Server, or not. In this article, we looked at how to use Microsoft's Software Licensing Management Tool ‘slmgr.vbs’ to manage your licenses. Windows servers Server from the command line. Although there are several ways to use slmgr.vbs, after reading this article, you will know what to do when working with licenses and the command line in Win 2008 Core Server.

- a fairly simple and straightforward procedure (well, at least more or less) than what we are going to consider later in this article. What if you want to do something more advanced and complex with the license, for example, such things as removing / changing the product key, performing online activation or extending the activation time. It is not as easy as a simple activation that is done by standard means OS with convenient graphical interface but not that difficult either. In this article, I will give you information on how and with what you can do this.

There is a command line tool called Slmgr.vbs that is included with Windows and provides features that are not available in the standard activation interface found in the Update and Security window, which you can reach by opening the Start menu and choosing Settings.

First: open a command prompt with administrator rights

This is required to use Slmgr.vbs. In Windows 10 or 8, right-click on the Start button (or the Win + X keyboard shortcut) and select "Command Prompt (Admin)". In Windows 7, find Command Prompt in the Start menu, under All Programs> System Tools. Right click on it and select "Run as administrator".

Viewing activation / license information

To display basic license and activation information, run the command below which will tell you what version of Windows you have, part of the product key so you can identify and show you if the system is activated.

To get more detailed information about the license, including activation ID, installation ID, and other details, enter the following command:

Viewing the license expiration date

To find out the period of the current activation of the system, use the command below. Since retail licenses for, say, home computers are activated on a perpetual basis, which will never expire, the command will be useful for commercial KMS organizations and servers. However, you can check the expiration date of your license and make sure it is permanent.

How to remove a product key

You can also remove the product key of the current Windows system using Slmgr.vbs. After executing the command below, restart your computer and your operating system will not have a product key, which means Windows will become inactive - without a license.

This allows you to transfer the license to another computer, if necessary. For example, if you want to donate old computer friend, but want to keep the license for yourself. However, as you know, Windows activation will be "tied" to the hardware of the computer on which it is installed, so you won't be able to transfer it just like that, but it's still possible, but that's not about that now (this will be in the next articles).

To delete license key, enter the following command at the command prompt:

However, the command does not completely remove the activation. Windows also stores the product key in the registry because it is sometimes necessary during computer settings and to prevent key theft. malware that can access the registry. In addition, the future owner of the computer (if he is more or less versed in computers) can easily remove the key from the registry, so you must also delete it from the registry with the following command:

How to install or change a product key

With slmgr.vbs you can enter new key product. If the system Windows already activated, using the command below you can replace the old key with a new valid one (instead of ##### - ##### - ##### - ##### - ##### enter a new key). After that, it is recommended that you restart your computer.

You can also do this in the activation settings screen in the computer settings, but the following command allows you to do this from the command line:

slmgr.vbs / ipk ##### - ##### - ##### - ##### - #####

Windows activation

Windows activation online

With the next command, you can try to activate Windows via the Internet.

Windows offline activation

To get the installation ID (ID) for offline activation, run the following command:

Now you need to receive a confirmation code for activating the system by phone. Go to the official Microsoft Windows Activation Help page. According to the instructions given, call the Microsoft Product Activation Center (there is nothing wrong with that, you will follow the instructions of the robot) and provide the installation ID obtained above and you will receive an activation code (in case everything is successfully confirmed). This can help you activate Windows system without internet connection.

Replace ACTIVATIONID with your Activation ID. which you got:

slmgr.vbs / atp ACTIVATIONID

After that, to make sure your OS is activated, you can use the following commands:

slmgr.vbs / dli or slmgr.vbs / dlv

How to renew activation

Let's take to example Windows 7, which has a 30-day trial period before it starts asking you for a product key. You can extend the trial period, i.e. reset this trial period back to 30 days by running the command below.

slmgr.vbs / Rearm

However, you will not be able to extend the trial period over and over and endlessly - the command can only be used a few times. If you want to know how many times, enter the slmgr.vbs / dlv command. I don’t remember exactly, but for each version it seems to have its own “number of times”. In Windows 7, if I'm not mistaken 3 times, and 5 times on Windows Server 2008 R2. Per Windows exception Option 10 works in all earlier versions.

Using Slmgr.vbs for Remote Computers

Usually Slmgr runs on the current computer, however you have the option to remote administration computers on the network, if you have access to them. For example, the first command below applies to the current computer and the second to remote computer... You just need to know the Computer name, username and password.

slmgr.vbs / option

slmgr.vbs computername username password / option

Other commands related to system activation can be used with the Slmgr.vbs command. See Slmgr.vbs Options for more details.



Did you like the article? Share it