diff --git a/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 b/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 index e2d9ec4..ef6317a 100644 --- a/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 +++ b/Winget-AutoUpdate/functions/Get-WingetOutdatedApps.ps1 @@ -34,7 +34,12 @@ function Get-WingetOutdatedApps { #Run winget to list apps and accept source agrements (necessary on first run) & $Winget list --accept-source-agreements | Out-Null + #Log Winget installed version + $WingerVer = & $Winget --version + Write-Log "Winget Version: $WingerVer" + #Get list of available upgrades on winget format + Write-Log "Checking application updates on Winget Repository..." "yellow" $upgradeResult = & $Winget upgrade | Out-String #Start Convertion of winget format to an array. Check if "-----" exists diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 692cafb..b2d5bbf 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -45,7 +45,6 @@ if (Test-Network){ } #Get outdated Winget packages - Write-Log "Checking application updates on Winget Repository..." "yellow" $outdated = Get-WingetOutdatedApps #Log list of app to update