Slmgr parameters. How to activate Windows7 so that activation never fails

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 various reasons, Windows does not want to activate on a network that has a running KMS server.

To activate manually, you must execute 3 consecutive commands in Command line. Command line launching 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 and automatic activation cannot be performed within the first 30 days of the grace period, customers can grant these operations to users with normal access rights.

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 this case, Windows turns the desktop wallpaper black and displays an intimidating 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 the 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 does not 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 the F8 key. 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. To enter the key, reopen the 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 the open KMS 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/

Like it or not, Windows Server licensing 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 until the license expires, and how to uninstall the license. In this article, we'll walk you through how to use Microsoft's command line tool 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 configure 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 with 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 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.
  • Purge the current Windows product keys from system registry for security reasons using the ‘cpky.
  • Installing a license using the ‘ilc option.
  • Reinstalling system license files using the ‘rilc option.
  • 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 no license activation is required. The evaluation version of Windows 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!

Resume evaluation Windows version 2008 is possible using slmgr.vbs. 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?

You can use dli or dlv options. Here's what the results of using them look like:

Figure 4: Results 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 in use, the license status, the remaining time, everything about the key management server.

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

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 new server Windows Server 2008 Core 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 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 perform automatic activation again.

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

If everything went well (as, finally, it was for me), you should see a window indicating the successful activation of the product (Figure 7). Hooray!

How do I 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 only need the hostname of the server (hostname / IP address), as well as the administrator 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 functionality 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 Windows Server licenses 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 command line in Win 2008 Core Server.


Sometimes slmgr.vbs and others errors system errors VBS may be related to problems in the Windows registry. Several programs can share the same slmgr.vbs file, but when these programs are uninstalled or changed sometimes orphaned (invalid) VBS registry entries are left behind.

Basically, this means that while the actual path to the file may have changed, its incorrect former location is still recorded in the Windows registry. When Windows tries looking up these incorrect file references (file locations on your PC), slmgr.vbs errors can occur. In addition, malware infection may have corrupted the registry entries associated with Windows. Thus, these invalid VBS registry entries need to be repaired to fix the root of the problem.

Manually editing the Windows registry to remove invalid slmgr.vbs keys is not recommended unless you are PC service professional. Errors made while editing the registry can make your PC inoperable and cause irreparable damage to your operating system... In fact, even a single comma in the wrong place can prevent your computer from booting!

Because of this risk, we highly recommend using a trusted registry cleaner such as WinThruster (Developed by Microsoft Gold Certified Partner) to scan and repair any slmgr.vbs-related registry problems. Using a registry cleaner automates the process of finding invalid registry entries, missing file references (like the one causing your slmgr.vbs error), and broken links within the registry. Before each scan, a backup copy that allows you to undo any changes with one click and protects you from possible damage to your computer. The best part is that fixing registry errors can dramatically improve system speed and performance.


A warning: Unless you are an experienced PC user, we do NOT recommend manually editing the Windows Registry. Incorrect use of Registry Editor can lead to serious problems and require reinstall Windows... We do not guarantee that problems resulting from improper use of Registry Editor can be corrected. Your use of the Registry Editor is at your own risk.

Before manually restoring windows registry. You need to create a backup by exporting a portion of the registry related to slmgr.vbs (eg.Windows):

  1. Click on the button Begin.
  2. Enter " command" v search bar ... DO NOT PRESS YET ENTER!
  3. Holding the keys CTRL-Shift on the keyboard, press ENTER.
  4. A dialog box for access will be displayed.
  5. Click on Yes.
  6. The black box opens with a blinking cursor.
  7. Enter " regedit" and press ENTER.
  8. In the Registry Editor, select the slmgr.vbs-related key (eg.Windows) you want to back up.
  9. On the menu File choose Export.
  10. In the list Save to select the folder where you want to save the Windows backup key.
  11. In field File name enter a name for your backup file, such as "Windows Backup".
  12. Make sure in the box Export range value selected Selected branch.
  13. Click on Save.
  14. The file will be saved with the extension .reg.
  15. You now have a backup of your slmgr.vbs-related registry entry.

The next steps for manually editing the registry will not be described in this article, as they can most likely damage your system. If you would like more information on manually editing the registry, please see the links below.