Vcloud Director Tools Install - Interactive


Using the following code to install tools, however this only mounts the installer, and doesn't do an automatic tools install.  I'd rather not touch every guest.  Any thoughts? See the code snipping highlighted in bold.  Note I have no access directly to vCenter, just VCD..

$vcdLogin = Connect-CIServer -Server $vcdSrv -Org $org -ErrorAction Stop

$vmlist = Get-Org -Name $Org | Get-OrgVdc -Name $VdcName | Get-CIVM | Format-table -autosize

Write-Host ""

Write-Host ""

Write-Host "Taking snapshots for each of those VM's" -ForegroundColor Cyan


$vm=Get-CIVM "W2K8R2_SP1_ENT_64"


# $vm.ExtensionData | Get-Member *tools* -ErrorAction stop

# $vm.ExtensionData | Get-Member *snapshot*

# $vm.ExtensionData | Get-Member *hardware*

$vm.extensiondata.CreateSnapshot($false,$true,$vm,"$vm snapshot")

# $vm.ExtensionData.GetSnapshotSection().snapshot

Start-CIVM $vm -Confirm:$false


Stop-CIVM $vm -Confirm:$false


Start-CIVM $vm -Confirm:$false

Write-Host "Upgrades completed for $vm" -ForegroundColor Cyan

Write-Host ""

Write-Host ""

0 Kudos
0 Replies