Travis Quinnelly bio photo

Travis Quinnelly

vTechify is my home to talk about all things virtualization. Here I share things learned in lab and production environments both for my documentation and others to stumble upon for reference.

Twitter Google+ LinkedIn Instagram Github
Check and upgrade Tools during power cycling

By default, many of us probably have our VMs check for new versions of VMTools upon each power cycle. That’s usually fine, but in some scenarios it’s not. Rather than change the global policy, this script will change just the VMs you want to not upgrade automatically.

Get-VM -Name <vmNamesHere> | Get-View | ForEach-Object {
  Write-Output $
  if ($ -ne "manual"){
    $vm = Get-VM -Name $
    $spec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $ = New-Object VMware.Vim.ToolsConfigInfo
    $ = "manual"
    $_this = Get-View -Id $vm.Id
    Write-Output "Completed"