Category Archives: PowerCli

Deploying multiple VMs via PowerCLI – Updated v1.2

DeployVMv1.2

I’ve gotten some great feedback from my original PowerShell/PowerCLI script to deploy multiple VMs asynchronously via a CSV file found here.  I decided a minor update was needed to employ these new ideas along with a few I had myself.

One of those ideas was to require the usage of the new PowerCLI 5.5 R2 features which allows the script to run without the need for a 32bit PowerShell console.

Changes include:

  • Cleaned up code / Minor bug fixes
  • Added CSV field descriptions to notes section
  • Removed requirement for 32bit PowerShell
  • Added requirement for PowerCLI 5.5 R2 or later
  • Added Boot parameter to determine whether or not to power on new VMs
  • Added OS Customization Spec to CSV (previously was hard coded in user variables)
  • Fixed logic for vSS vs vDS – Added parameter to CSV
  • Added ability to use DHCP instead of just static IPs
  • Renamed a few CSV fields to better describe parameter
  • Added progress bar to indicate status

Continue reading

PowerCli Update – PowerCLI 5.5 R2

VMware has rolled out a few updates this week with the release of vSphere 5.5 Update 1. The majority of the products involved all got some sort of bump/patch as well as the addition of VSAN. Not to be outdone, Alan and his team also released PowerCli 5.5 R2 (Build 1649237). It is wonderful to see grand improvements in a product I use everyday.

A full rundown of the new features and download link can be found here.

It just may be time to give a serious look at updating to PowerShell 4.0 as with this update, PowerCli is fully compatible. Time to start looking at other plugins as well and determine what dependencies might have issues.

Another one of the new features that caught my eye was this:

64 bit Support

The New/Set-OSCustomizationSpec cmdlets have been updated to work in 64-bit PowerShell and no longer require running in a 32-bit PowerShell environment.

This will help my VM Deployment script as you will now longer have to run in 32bit mode.  I’ll be checking this out and updating shortly.

Deploying multiple VMs via PowerCLI

Find the latest version here.

Here’s a PowerCLI script I have been playing with for a while that helps with deploying multiple VMs.

Highlights include deploying both Windows and Linux VMs via Customization Specification enabling the setting of hostname, IP address, etc. The script uses help from LucD to deploy using -RunAsync which speeds things up tremendously.

It’s a bit lengthy, with a rudimentary level of logging and error catching but has served me well.

Continue reading