From f48aff87f65c42519ef3958b7413c7bb41314479 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 21 Feb 2022 18:56:41 +0100 Subject: [PATCH] Add Winget output to log file For better troubleshoot, the winget command output is now saved in the log file. --- Winget-AutoUpdate/winget-upgrade.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 82ff9fb7..7276ff21 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -269,7 +269,7 @@ if (Test-Network){ #Winget upgrade Write-Log "------ Winget - $($app.Name) Upgrade Starts ------" "Gray" - & $upgradecmd upgrade --id $($app.Id) --all --accept-package-agreements --accept-source-agreements -h + & $upgradecmd upgrade --id $($app.Id) --all --accept-package-agreements --accept-source-agreements -h | Tee-Object -file $LogFile -Append Write-Log "----- Winget - $($app.Name) Upgrade Finished -----" "Gray" #Check installed version