From 6a8215e39c58df25131c9a41e08c29ede1ee9eb6 Mon Sep 17 00:00:00 2001 From: Nick Brown <109540830+nickjisc@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:55:06 +0000 Subject: [PATCH] remove .data from the main upgrade add log for excluded / included apps --- Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 index 545049a..d5702b9 100644 --- a/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -245,7 +245,8 @@ if (Test-Network) { New-Item "$WorkingDir\logs\error.txt" -Value "Whitelist doesn't exist in GPO" -Force Exit 1 } - $toUpdate = $toUpdate.Data + $toUpdate = $toUpdate + foreach ($app in $toUpdate) { Write-ToLog "Include app ${app}" } } else { $BlackList = $toSkip.GetUpperBound(0) @@ -254,7 +255,8 @@ if (Test-Network) { New-Item "$WorkingDir\logs\error.txt" -Value "Blacklist doesn't exist in GPO" -Force Exit 1 } - $toSkip = $toSkip.Data + $toSkip = $toSkip + foreach ($app in $toSkip) { Write-ToLog "Exclude app ${app}" } } }