Add BeginWithRestart parameter

parent d6b7b038
param($global:RestartRequired=0,
$global:MoreUpdates=0,
$global:MaxCycles=5,
$MaxUpdatesPerCycle=500)
$MaxUpdatesPerCycle=500,
$BeginWithRestart=0)
$Logfile = "C:\Windows\Temp\win-updates.log"
......@@ -224,6 +225,11 @@ $script:SearchResult = New-Object -ComObject 'Microsoft.Update.UpdateColl'
$script:Cycles = 0
$script:CycleUpdateCount = 0
if ($BeginWithRestart) {
$global:RestartRequired = 1
Check-ContinueRestartOrEnd
}
Check-WindowsUpdates
if ($global:MoreUpdates -eq 1) {
Install-WindowsUpdates
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment