Assigning and updating licenses for VMware vSphere components – such as ESXi or vCenter servers – is not something anybody is looking forward to, and I think every admin who had ever been dealing with managing an extensive infrastructure will agree. Naturally, it all is basically effortless in theory: you just have to open the vSphere Client, and here we go! However, when there are too many active hosts, a simple license assignment can turn into a bit of a headache.

PowerCLI: A Decent Alternative

That’s why it can appear impressive how fast and straightforward the process is with PowerCLI. Let’s take a look!

You can also switch this scenario up a little if you have more keys to assign or update:

In case you want to add/update the VMware ESXi license, there’s a path:

If you merely want to add the VMware ESXi license key to all the hosts in the cluster, it goes even simpler:

In order to add the Evaluation-key for ESXi, just write it as 00000-00000-00000-00000-00000.

If you want to check up on the existing license keys, here’s a command:

If you’d like to add a key which capacity is lower than the licenses in use, you would be able to, even though Web Client/vSphere Client will notify you that the license capacity is overused:

License capacity is overused

If such a situation occurred, you should simply buy more licenses, get a new key, and update all the licenses in your data center.

Speaking of which, if you want to know how many licenses exactly there are in the said data center and when do they expire, here’s a very simple script from You are supposed to get a table like this:

Table of licenses

However, in case you need something more serious, well, then, VMware has got something for you, more precisely –  vSphere Software Asset Management Tool utility:

vSphere Software Asset Management Tool

StarWind VSAN for vSphere uses your local hypervisor cluster to create fault-tolerant and robust virtual shared storage, eliminating the need to buy a costly physical SAN. You can deploy it on any off-the-shelf hardware you already got. Thanks to mirroring of internal hard disks and flash between hypervisor servers, you get a 2-node Highly Available cluster. There is no need for a witness instance, and you’re not restricted on storage size, features, or number of VMs. Your IT-environment will not only achieve constant uptime and skyrocketing performance, you will also save a good deal on CapEx and OpEx.
Find out more about ➡ StarWind VSAN for vSphere


As you can see, this algorithm is relatively straightforward and not at all tedious. I hope this little lifehack can help you!

Views All Time
Views Today
Back to blog
The following two tabs change content below.
Alex Samoylenko
Alex Samoylenko
Virtualization technology professional. 10 years ago he built #1 website on virtualization in Russia. Alex runs his own virtualization-focused company VMC. He is a CEO of a mobile game publisher Nova Games and a CEO of an international dating site