Developer meets PowerCLI - awesomeness ensues

Published by Christian Mohn · Read in about 1 min (208 words)

A couple of days ago, while I was at VMworld Europe I got the following tweet from Asbjørn A. Mikkelsen (@neslekkim) (translated from norwegian):

@h0bbel Do you know if I can script something against vCenter to duplicate (or create from template) VMs, and also start/stop them?

My immediate response, was of course to suggest using PowerCLI. Asbjørn, who works as a full time developer, jumped at PowerCLI immediately and within a very short time frame came up with a PowerCLI script for the task at hand.

You can download the script and play around with it, if you want. Inline documentation is in Norwegian, and if Asbjørn had intended to redistribute the script I’m sure he would have optimized it more than the current revision.

The point here isn’t the implementation itself, but rather the fact that he was able to put this automation routine together very quickly, and completely without prior knowledge to PowerCLI at all.

I do feel bad for not pointing him to PowerGUI and the VI Toolkit PowerPack before he sat down and crafted this in Notepad though. I’m sure he cursed me silently as soon as I pointed them out to him, as that combination makes this kind of automation so much easier.

Post last updated on January 2, 2024: Add author

About

vNinja.net is the digital home of Christian Mohn and Stine Elise Larsen.

The primary focus is on IT architecture and data center technologies like virtualization and related topics, but other content also pops up from time to time.

Sponsors