PowerShell – Installing Windows Updates – Suppress Reboots

email me

$LocalPath = 'C:\MSUpdates'

$MSUpdates = @(Get-ChildItem –Path $LocalPath -Filter '*.msu')
if ($MSUpdates.Count -ge 1) {
$MSUpdates | % {
Write-Host "Installing Microsoft Update: $($_.Name)"
& Start-Process -FilePath “wusa.exe” -ArgumentList "$($_.Name) /quiet /norestart" -Wait
}
} else {
Write-Host 'No updates found!'
}

Screenshot in ISE