I have written a very simple gem to perform basic functions with an ESXI.

You can have a look at the Github Page for the source.