Name instead of ID...
parent
5f852d986d
commit
6b961ce22e
|
@ -32,14 +32,14 @@ Function Update-App ($app) {
|
|||
#Test for a Pending Reboot (Component Based Servicing/WindowsUpdate/CCM_ClientUtilities)
|
||||
$PendingReboot = Test-PendingReboot
|
||||
if ($PendingReboot -eq $true) {
|
||||
Write-Log "A Pending Reboot lingers and probably prohibited $($app.Id) from upgrading..." "Red"
|
||||
Write-Log "...an install for $($app.Id) is NOT executed!" "Red"
|
||||
Write-Log "A Pending Reboot lingers and probably prohibited $($app.Name) from upgrading..." "Red"
|
||||
Write-Log "...an install for $($app.Name) is NOT executed!" "Red"
|
||||
$FailedToUpgrade = $true
|
||||
break
|
||||
}
|
||||
|
||||
#If app failed to upgrade, run Install command
|
||||
Write-Log "An upgrade for $($app.Id) failed, now trying an install..." "Yellow"
|
||||
Write-Log "An upgrade for $($app.Name) failed, now trying an install..." "Yellow"
|
||||
& $Winget install --id $($app.Id) --accept-package-agreements --accept-source-agreements -h | Tee-Object -file $LogFile -Append
|
||||
|
||||
#Set mods to apply as an install
|
||||
|
|
Loading…
Reference in New Issue