T E C H N I C A L W H I T E P A P E R / 7 5
VMware vSphere 5.0 Evaluation Guide –
Volume One
To do this, type the following:
New-VM -Name VM_08 -ResourcePool (Get-VMHost tm-pod01-esx03*) -Datastore (Get-DatastoreCluster
“Datastore Cluster 01”) -NumCPU 2 -MemoryMB 4096 -DiskMB 40000 -NetworkName Production02
-Floppy -CD -DiskStorageFormat Thin
Figure 98.
The New-VM cmdlet can also be used to create any number of virtual machines with the same configuration.
The following example shows how to create 10 new virtual machines with the same configuration. In the
following example, $_ refers to the current number in the pipeline, because they are passed through to the
New-VM
cmdlet:
10..20 | Foreach { New-VM -Name VM_$_ -ResourcePool (Get-VMHost tm-pod01-esx03*) -Datastore (Get-
DatastoreCluster “Datastore Cluster 01”) -NumCPU 2 -MemoryMB 4096 -DiskMB 40000 -NetworkName
Production02 -Floppy -CD -DiskStorageFormat Thin }
Figure 99.