Exclude OpenSSH from package removal

Some people need this to avoid installing third-party programs like PuTTY
This commit is contained in:
CodingWonders 2024-12-28 22:23:20 +01:00
parent 9dd508d069
commit d2db3bec53

View File

@ -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."