Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| windows:hyper-v:windows-vm-template-deployment-customzation [2026/05/15 09:08] – chris | windows:hyper-v:windows-vm-template-deployment-customzation [2026/05/19 15:02] (current) – chris | ||
|---|---|---|---|
| Line 39: | Line 39: | ||
| < | < | ||
| < | < | ||
| - | < | + | < |
| </ | </ | ||
| </ | </ | ||
| Line 93: | Line 93: | ||
| # Wait VM provisioned | # Wait VM provisioned | ||
| $Seconds = 0 | $Seconds = 0 | ||
| + | $Stage = 0 | ||
| Do { | Do { | ||
| $Seconds++ | $Seconds++ | ||
| Start-Sleep -Seconds 1 | Start-Sleep -Seconds 1 | ||
| $HeartBeat = Get-VMIntegrationService -VMName $VMName -Name " | $HeartBeat = Get-VMIntegrationService -VMName $VMName -Name " | ||
| - | Write-Host -NoNewLine " | + | If ($Stage -in @(0, 2) -and $HeartBeat.PrimaryStatusDescription -eq ' |
| - | } Until (($HeartBeat.PrimaryStatusDescription | + | $Stage++ |
| + | } | ||
| + | If ($Stage -eq 1 -and $HeartBeat.PrimaryStatusDescription -ne ' | ||
| + | $Stage++ | ||
| + | } | ||
| + | Write-Host -NoNewLine " | ||
| + | } Until ($Stage -ge 3) | ||