mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-04-01 17:12:09 +00:00
Update functions/public/Invoke-WPFUpdateMGMGT.ps1
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
This commit is contained in:
parent
f9878a3472
commit
dc236b9865
@ -33,10 +33,18 @@ function Invoke-WPFUpdateMGMT {
|
||||
param ($selectedUpdates, $WPFUpdateVerbose)
|
||||
foreach ($update in $selectedUpdates) {
|
||||
Write-Host "Installing update $($update.Title) on $($update.ComputerName)"
|
||||
if ($WPFUpdateVerbose) {
|
||||
Get-WindowsUpdate -ComputerName $update.ComputerName -Title $update.Title -Install -Confirm:$false -Verbose -IgnoreReboot:$true -IgnoreRebootRequired:$true
|
||||
if ($update.KB -ne "") {
|
||||
if ($WPFUpdateVerbose) {
|
||||
Get-WindowsUpdate -ComputerName $update.ComputerName -KBArticleID $update.KB -Install -Confirm:$false -Verbose -IgnoreReboot:$true -IgnoreRebootRequired:$true
|
||||
} else {
|
||||
Get-WindowsUpdate -ComputerName $update.ComputerName -KBArticleID $update.KB -Install -Confirm:$false -IgnoreReboot:$true -IgnoreRebootRequired:$true
|
||||
}
|
||||
} else {
|
||||
Get-WindowsUpdate -ComputerName $update.ComputerName -Title $update.Title -Install -Confirm:$false -IgnoreReboot:$true -IgnoreRebootRequired:$true
|
||||
if ($WPFUpdateVerbose) {
|
||||
Get-WindowsUpdate -ComputerName $update.ComputerName -Title "$($update.Title)" -Install -Confirm:$false -Verbose -IgnoreReboot:$true -IgnoreRebootRequired:$true
|
||||
} else {
|
||||
Get-WindowsUpdate -ComputerName $update.ComputerName -Title "$($update.Title)" -Install -Confirm:$false -IgnoreReboot:$true -IgnoreRebootRequired:$true
|
||||
}
|
||||
}
|
||||
}
|
||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
|
||||
|
Loading…
Reference in New Issue
Block a user