From d2db3bec53ff1d8d12becf4df3e7f877efb60ca0 Mon Sep 17 00:00:00 2001 From: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Date: Sat, 28 Dec 2024 22:23:20 +0100 Subject: [PATCH] Exclude OpenSSH from package removal Some people need this to avoid installing third-party programs like PuTTY --- functions/microwin/Microwin-RemovePackages.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/microwin/Microwin-RemovePackages.ps1 b/functions/microwin/Microwin-RemovePackages.ps1 index 0f074483..837bdbf1 100644 --- a/functions/microwin/Microwin-RemovePackages.ps1 +++ b/functions/microwin/Microwin-RemovePackages.ps1 @@ -35,7 +35,8 @@ function Microwin-RemovePackages { $_ -NotLike "*VBSCRIPT*" -AND $_ -NotLike "*License*" -AND $_ -NotLike "*Hello-Face*" -AND - $_ -NotLike "*ISE*" + $_ -NotLike "*ISE*" -AND + $_ -NotLike "*OpenSSH*" } } else { $pkgList = dism /english /image="$scratchDir" /get-packages | Select-String -Pattern "Package Identity : " -CaseSensitive -SimpleMatch @@ -58,7 +59,8 @@ function Microwin-RemovePackages { $_ -NotLike "*VBSCRIPT*" -AND $_ -NotLike "*License*" -AND $_ -NotLike "*Hello-Face*" -AND - $_ -NotLike "*ISE*" + $_ -NotLike "*ISE*" -AND + $_ -NotLike "*OpenSSH*" } } else { Write-Host "Packages could not be obtained with DISM. MicroWin processing will continue, but packages will be skipped."