From a046bcd6a2760d02205cb705cf5257776835bbd9 Mon Sep 17 00:00:00 2001 From: Chris Titus Tech Date: Tue, 13 Aug 2024 12:33:44 -0500 Subject: [PATCH] Fix provisioned packages --- .../private/Invoke-WinUtilMicroWin-Helper.ps1 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 b/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 index 15be02d8..bdd843f8 100644 --- a/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 +++ b/functions/private/Invoke-WinUtilMicroWin-Helper.ps1 @@ -142,10 +142,20 @@ function Remove-ProvisionedPackages() { $_.PackageName -NotLike "*Notepad*" -and $_.PackageName -NotLike "*Printing*" -and $_.PackageName -NotLike "*Wifi*" -and - $_.PackageName -NotLike "*Foundation*" + $_.PackageName -NotLike "*Foundation*" -and + $_.PackageName -NotLike "*YourPhone*" -and + $_.PackageName -NotLike "*Xbox*" -and + $_.PackageName -NotLike "*WindowsTerminal*" -and + $_.PackageName -NotLike "*Calculator*" -and + $_.PackageName -NotLike "*Photos*" -and + $_.PackageName -NotLike "*VCLibs*" -and + $_.PackageName -NotLike "*Paint*" -and + $_.PackageName -NotLike "*Gaming*" -and + $_.PackageName -NotLike "*Extension*" -and + $_.PackageName -NotLike "*SecHealthUI*" + } - $appxProvisionedPackages = $appxProvisionedPackages | Where-Object { $_.PackageName -NotLike "*SecHealthUI*" } $counter = 0 foreach ($appx in $appxProvisionedPackages) { $status = "Removing Provisioned $($appx.PackageName)"