Aug 062008
Carter Shanklin explains a great new feature of the official 1.0 release of the VI Toolkit here:
http://blogs.vmware.com/vipowershell/2008/08/keeping-it-simp.html
This should make your scripts (the ones created for the beta release) a lot shorter!
New-VM -vmHost (Get-VMHost $VMHostName) -datastore (Get-Datastore $DatastoreName) -network (Get-Network $NetworkName)
or:
$VMHost = Get-VMHost $VMHostName
$Datastore = Get-Datastore $DatastoreName
$Network = Get-Network $NetworkName
New-VM -VMHost $VMHost -Datastore $Datastore -Network $Network
becomes:
New-VM -VMHost $VMHostName -Datastore $DatastoreName -Network $NetworkName
Nice!
Related posts:
