mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[Windows] Add pause after Windows Update (#4641)
This commit is contained in:
committed by
GitHub
parent
d0f20ddfa3
commit
c50afe27cd
@@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
## File: Wait-WindowsUpdatesForInstall.ps1
|
||||
## Desc: Wait for installation windows updates to complete
|
||||
################################################################################
|
||||
|
||||
Invoke-SBWithRetry -RetryCount 10 -RetryIntervalSeconds 120 -Command {
|
||||
$inProgress = Get-WindowsUpdatesHistory | Where-Object Status -eq "InProgress"
|
||||
if ( $inProgress ) {
|
||||
$title = $inProgress.Title -join "`n"
|
||||
throw "InProgress: $title"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user