Skip to content

Commit d2db3be

Browse files
committed
Exclude OpenSSH from package removal
Some people need this to avoid installing third-party programs like PuTTY
1 parent 9dd508d commit d2db3be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

functions/microwin/Microwin-RemovePackages.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function Microwin-RemovePackages {
3535
$_ -NotLike "*VBSCRIPT*" -AND
3636
$_ -NotLike "*License*" -AND
3737
$_ -NotLike "*Hello-Face*" -AND
38-
$_ -NotLike "*ISE*"
38+
$_ -NotLike "*ISE*" -AND
39+
$_ -NotLike "*OpenSSH*"
3940
}
4041
} else {
4142
$pkgList = dism /english /image="$scratchDir" /get-packages | Select-String -Pattern "Package Identity : " -CaseSensitive -SimpleMatch
@@ -58,7 +59,8 @@ function Microwin-RemovePackages {
5859
$_ -NotLike "*VBSCRIPT*" -AND
5960
$_ -NotLike "*License*" -AND
6061
$_ -NotLike "*Hello-Face*" -AND
61-
$_ -NotLike "*ISE*"
62+
$_ -NotLike "*ISE*" -AND
63+
$_ -NotLike "*OpenSSH*"
6264
}
6365
} else {
6466
Write-Host "Packages could not be obtained with DISM. MicroWin processing will continue, but packages will be skipped."

0 commit comments

Comments
 (0)