Developer meets PowerCLI - awesomeness ensues

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 July 11, 2018: Replace cmohn with Christian Mohn as author

About the author

Christian Mohn Profile Picture

Christian Mohn works as a Chief Technologist SDDC for Proact in Norway.

See his About page for more details, or find him on Twitter.