Quantcast
Channel: VMware Communities : Popular Discussions - vCloud Director PowerCLI
Viewing all articles
Browse latest Browse all 13334

Vcloud Director Tools Install - Interactive

$
0
0

Hi,

 

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

$vmlist

 

$vm=Get-CIVM "W2K8R2_SP1_ENT_64"

$vm

# $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

$vm.ExtensionData.InstallVMwareTools()

Stop-CIVM $vm -Confirm:$false

$vm.ExtensionData.UpgradeHardwareVersion()

Start-CIVM $vm -Confirm:$false

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

Write-Host ""

Write-Host ""


Viewing all articles
Browse latest Browse all 13334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>