# encoding: ascii
# api: powershell
# title: The other Post
# description: http://halr9000.com/article/642
# version: 0.1
# license: CC0
# x-poshcode-id: 964
# x-archived: 2009-03-27T18:09:16
#
#
$insParm = '/s /v"/qn /norestart"' 
$updList = get-cluster -name $YouClusterNameHere | get-vm |
	where-object {$_.powerstate -eq "PoweredON"} |
		foreach-object { get-view $_.ID } |
			where { $_.guest.toolsstatus -match "toolsOld" } 
foreach ($uVM in $updList) 
{
	$uVM.name 
	$uVM.UpgradeTools_Task($insParm) 
	#Wait 30 seconds before starting another update task 
	Start-sleep -s 30 
}
