Powershell

I saw this one on the VI Toolkit forums today and had to pass it on.  Someone who goes by ade.orimalade@e-mis.com writes:

$cluster = "< >" # Enter the required cluster name

$installerArgs = ‘REBOOT="ReallySuppress"’

Get-Cluster -Name $cluster | Get-VM | % { (Get-View $_).UpgradeTools_Task($installerArgs) }

So the key is to provide that REBOOT=”ReallySuppress” line to the UpgradeTools_Task() method.

Update!

So this first one didn’t work as was noted in the comments.  I didn’t have time to attack the problem myself, but as always, the VI Toolkit forum comes through.  Someone who goes by the nick jp1960 submitted this solution:

 

   1: $insParm = '/s /v"/qn /norestart"' 
   2: $updList = get-cluster -name $YouClusterNameHere | get-vm |
   3:     where-object {$_.powerstate -eq "PoweredON"} | 
   4:         foreach-object { get-view $_.ID } |
   5:             where { $_.guest.toolsstatus -match "toolsOld" } 
   6: foreach ($uVM in $updList) 
   7: { 
   8:     $uVM.name 
   9:     $uVM.UpgradeTools_Task($insParm) 
  10:     #Wait 30 seconds before starting another update task 
  11:     Start-sleep -s 30 
  12: }

: http://halr9000.com/article/642

daniel
2008-11-19 16:37:09

Hi Hal,

this is not working for me. I fixed it to

Get-Cluster -Name $cluster | Get-VM | % { (Get-View $_.ID).UpgradeTools_Task($installerArgs) }

But the actual installation process was not initiated :(
While I was logged in to the VM which should be upgraded a message dialog popped up telling me something about MSI comand line paramters…

Regards,

daniel

2008-11-25 16:52:46

Ok, how about this update?

2008-11-27 07:55:22

[...] Published in Management & Automation I’ve been getting a lot of questions on this script that makes it possible to install VMware tools without rebooting. I must admit that it’s a [...]

Comments for this post will be closed on 23 February 2009.

  • Microblog

  • Recent Posts

  • Recent Comments

  • meta