Hi Luc,
can you please suggest what needs to be modified to get following functionality.
what i want to achieve is if there is no response in orange line within 10 seconds it shud move to next snippet .
$vms_tools_upgrade_needed=$vms | Where-Object {$_.Guest.GuestFamily -eq 'windowsGuest' -and $_.ExtensionData.guest.toolsversionstatus -eq 'guesttoolsneedupgrade'}
write-host "there are" $vms_tools_upgrade_needed.count "windows vms pending for tool upgrade in " $cluster.name -ForegroundColor Yellow
$response = Read-Host "Would you like to update vmware tools?"
if ($response -eq "yes")
{
Write-Host "based on your response updating vmware tools which will take into effect in next powercycle " -ForegroundColor Green
#code
if($response -eq "")
{
Start-Sleep -Seconds 10
Write-Host "moving to next snippet" -ForegroundColor Gray
}