Aug 13 2019
Management

4 Ways to Set Up a VM Using Automatic Virtual Machine Activation

In Windows, AVMA, simplifies and scales the virtual machine activation process.

Activating Microsoft Windows virtual machines can be challenging. But by using automatic virtual machine activation with the built-in Software Licensing Manager, administrators can quickly and easily license one or many VMs at once.

Let’s see what it takes to activate VMs using AVMA, both from the ­command line and remotely via PowerShell.

1. Check License Status of an Invalid KMS Key

To check the license status of a VM that has an invalid KMS key, an admin will execute a VBScript called slmgr.vbs on the VM console. Open up a command prompt by running cmd.exe and type “slmgr /dli.” If the VM is using an invalid KMS key, the script will bring up a dialog box that indicates as much.

2. Check License Status of an Unlicensed VM

Administrators can also use the slmgr script to check the license status of an unlicensed VM, but the dialog box will look different. Running “slmgr /dli” on a VM that does not have a license will return a notification displaying the message “Error: product key not found.”

MORE FROM BIZTECH: What makes more sense for a business: virtual machines or containerization?

3. Activate a VM License via Command Prompt

If an administrator has an available product key, he or she can use the slmgr script via cmd.exe (command prompt). This time, however, instead of using the /dli argument, the administrator would use the /ipk argument, followed by the product key, which is a 25-digit alphanumeric code. It might look like this: “slmgr /ipk DBGBW-NPF86-BJVTX-K3WKJ-MTB6V.” 

4. Activate a VM License via PowerShell

Using the command line is fine for a couple of VMs, but an admin can also leverage PowerShell to activate VMs in bulk. If an admin has PowerShell Remoting enabled, he or she can invoke “slmgr.vbs /ipk <LicenseKey>” remotely on VMs using the Invoke-Command: “Invoke-Command -ComputerName AVMA1 -ScriptBlock { cscript C:\Windows\System32\slmgr.vbs /ipk <ProductKey>}.”

Digital%20Transformation_IR_1.jpg

tomozina/Getty Images
Close

Become an Insider

Unlock white papers, personalized recommendations and other premium content for an in-depth look at evolving IT