Rajeev over at Firstsource has written a PowerShell (VI-Toolkit) script that creates multiple virtual machines based on a template.
$vc = Get-VIServer -Server <server> -User <username> -Password <passwd> $esx = Get-VMHost -Server $vc -Name <host> $temp = Get-Template -Server $vc | where {$_.name -like "winxp"} $i = 0 $array = "test1","test2"
while ($i -le 1)
{
$vm = New-VM -Name $array[$i] -Template $temp -Host $esx $i++ }
This script creates two virtual machines, the name of the new virtual machine is based on the contents of the array e.g. test1 and test2.