Tag Archives: Automation

Getting Started with PowerCLI for Linux (PowerCLI Core)

powerclicoreBased on Microsoft PowerShell Core which enables users to use PowerShell on Linux, Mac and Docker, VMware has started to make PowerCLI compatible with the new PowerShell. This allows to run scripts that were previously only available for Windows on Linux or Mac based systems.

In this post I am going to give a quick startup guide to the installation and configuration of PowerCLI Core.

Read more »

VMware HCL Check with PowerCLI (Proof of Concept)

Announced in my VMware HCL in JSON Format post a few days ago, here is now a working version of my script. The script does not create a fancy report at the moment, it just writes some output and the result. It’s only intended to show that it actually works. Here is an example:


There are still some problems, but especially with HP, Dell or IBM Systems, it produces good results.

Read more »

Check VMware HCL with PowerCLI (half-done, need assistance)

It’s on my to-do list for quite a long time: Create a Script that checks hardware against VMwares HCL. There are some problems that needs to be solved to automate the process. My main problems are matching the installed ESXi version to the release Level (eg. 5.5 U2, 6.0, 6.0 U1,…), integrating the HCL into a script and matching HCL to the physical hardware.

This is what I can do today with PowerCLI, basically by running “Get-VMHost | Check-HCL“:
I’m not sure if anyone is interested in automating HCL checks because I couldn’t find any scripts online. If you are interested, nice! I need assistance…

I need a larger pool of hardware information to know how hardware identifies itself. So if you want to support me, please run the following PowerCLI command and send me the output (Just Copy/Paste CSV file contents to my Contact Form, or send me an eMail. I will respond with the output of my script as shown above). If you don’t want to disclose your hostnames, just remove the “Name” part in the command, or replace the content with dummy-names.

Get-VMHost |select Name,Build,Manufacturer,Model,ProcessorType |Export-Csv hosts.csv -NoTypeInformation

If you are interested in how the script works, or the script/function itself, feel free to contact me. (It’s unfinished spaghetti code….)

Some additional features:


Display VMware HCL link (For further verification)


Display all supported ESXi versions for the hardware


Product End Of Support Matrix now available as JSON (incl. Script)

The database used at my VMware Product End Of Support Countdown is now available in JSON. The database is based on VMware Lifecycle Product Matrix and allows you to use the information in scripts or for automation purposes.


I’ve also written a small script to demonstrate what this information can be used for.

Read more »

ESXi Version Information now available as JSON (incl. Script example)

Out of many reasons, I need VMware ESXi version information in a format that can be reused in scripts. I maintain a manual list since a couple of years but this list can’t be used for automation purposes. VMware does not provide this information in the required format, so I created my own database which is now also available as JSON file.


I’ve also written a small script to demonstrate what this information can be used for. Read more »

Pre-installed ESXi 6.0 on SD Cards or Flash Drives

Many ESXi installations are running on SD Cards or flash drives. In my opinion, it’s a good practice. The hypervisor itself requires about 150MB, and the full installation on a SD Card is less than 1GB, without diagnostic partitions. VMware recommends using a 4GB or larger USB/SD device. When you want to install ESXi and you don’t use auto-deploy, install servers or other automation tools you typically have to mount an ESXi ISO file to your server management system (iLO, iDRAC,…) or work with a physical installation media. This is somewhat slow and uncomfortable, but there is a little trick to make the installation faster.

You can prepare the USB/SD device with the ESXi installer, plug it into your server and install it to the device itself by overwriting the installer. You can also use customized installers when your hardware requires special drivers. Read more »

vSphere 6.0 – How to use ESXCLI Commands in PowerCLI

PowerCLI, a set of PowerShell extensions for vSphere, is a great tool for automating VMware configuration and management tasks. It allows you to change a lot of ESXi host and vCenter settings. One powerful cmdlet is Get-EsxCli which allows you to run ESXCLI tasks from your PowerCLI console. ESXCLI is the main configuration command on an ESXi host. This post explains how to use the Get-EsxCli cmdlet.


Read more »

Unattended VMware vSphere Client Installation (One-Click Install)

The VMware vSphere Client has an unattended install feature. This feature allows to install the client automatically without interaction. I wrote a little batch file which automatically downloads and installs all versions of the vSphere Client with one click.


Download: install-vsphere-client.zip

Ensure that you run the script as administrator:

@echo off
bitsadmin.exe /transfer "4.1" http://vsphereclient.vmware.com/vsphereclient/1/6/5/1/0/2/3/VMware-viclient-all-4.1.0-1651023.exe %tmp%\VMware-viclient-all-4.1.0-1651023.exe
bitsadmin.exe /transfer "5.0" http://vsphereclient.vmware.com/vsphereclient/1/9/1/7/4/6/9/VMware-viclient-all-5.0.0-1917469.exe %tmp%\VMware-viclient-all-5.0.0-1917469.exe
bitsadmin.exe /transfer "5.1" http://vsphereclient.vmware.com/vsphereclient/2/3/0/6/3/5/6/VMware-viclient-all-5.1.0-2306356.exe %tmp%\VMware-viclient-all-5.1.0-2306356.exe
bitsadmin.exe /transfer "5.5" http://vsphereclient.vmware.com/vsphereclient/1/9/9/3/0/7/2/VMware-viclient-all-5.5.0-1993072.exe %tmp%\VMware-viclient-all-5.5.0-1993072.exe
bitsadmin.exe /transfer "6.0" http://vsphereclient.vmware.com/vsphereclient/VMware-viclient-all-6.0.0.exe %tmp%\VMware-viclient-all-6.0.0.exe

start /wait %tmp%\VMware-viclient-all-4.1.0-1651023.exe /q /s /w /L1033 /v" /qr"
start /wait %tmp%\VMware-viclient-all-5.0.0-1917469.exe /q /s /w /L1033 /v" /qr"
start /wait %tmp%\VMware-viclient-all-5.1.0-2306356.exe /q /s /w /L1033 /v" /qr"
start /wait %tmp%\VMware-viclient-all-5.5.0-1993072.exe /q /s /w /L1033 /v" /qr"
start /wait %tmp%\VMware-viclient-all-6.0.0.exe /q /s /w /L1033 /v" /qr"

del %tmp%\VMware-viclient-all-4.1.0-1651023.exe
del %tmp%\VMware-viclient-all-5.0.0-1917469.exe
del %tmp%\VMware-viclient-all-5.1.0-2306356.exe
del %tmp%\VMware-viclient-all-5.5.0-1993072.exe
del %tmp%\VMware-viclient-all-6.0.0.exe

If you need one specific version only:

@echo off
bitsadmin.exe /transfer "5.5" http://vsphereclient.vmware.com/vsphereclient/1/9/9/3/0/7/2/VMware-viclient-all-5.5.0-1993072.exe %tmp%\VMware-viclient-all-5.5.0-1993072.exe
start /wait %tmp%\VMware-viclient-all-5.5.0-1993072.exe /q /s /w /L1033 /v" /qr"
del %tmp%\VMware-viclient-all-5.5.0-1993072.exe


@echo off
bitsadmin.exe /transfer "6.0" http://vsphereclient.vmware.com/vsphereclient/VMware-viclient-all-6.0.0.exe %tmp%\VMware-viclient-all-6.0.0.exe
start /wait %tmp%\VMware-viclient-all-6.0.0.exe /q /s /w /L1033 /v" /qr"
del %tmp%\VMware-viclient-all-6.0.0.exe

How to Create a Cron Job on vMA

The vMA (vSphere Management Assistant) is a virtual appliance provided by VMware that allows to manage vCenter Server or ESX Hosts and run scripts. You can also use it to run script periodically with cron. It is a small linux appliance delivered with all necessary tools out of the box. I usually deploy a vMA on each platform. This post describes how to prepare scripts to be used with cron and how to create cronjobs. The process is very similar on all vMA versions from vSphere 4.0 to vSphere 5.5.

Read more »

Unattended ESXi Installation from an USB Flash Drive

I was asked if it is possible to create an USB Flash Drive that can install ESXi on a server automatically. ESXi has a Scripted Install feature which allows to put all installation parameters into a Kickstart file to run unattended Installations. This post explains how to create an USB Flash Drive that does unattended ESXi installations. You can plug it into a Server, power it on and ESXi will be installed automatically.

Read more »