fix: remove the DisableSearchHistory and DisableSearchHighlights switches (#800)

This commit is contained in:
HetCreep
2026-10-08 21:59:54 +02:00
committed by GitHub
parent 386ae0c581
commit 5ca1b7001b
9 changed files with 24 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-2
View File
@@ -27,7 +27,6 @@ param (
[switch]$EnableWindowsSandbox,
[switch]$EnableWindowsSubsystemForLinux,
[switch]$DisableTelemetry,
[switch]$DisableSearchHistory,
[switch]$DisableFastStartup,
[switch]$DisableBitlockerAutoEncryption,
[switch]$DisableModernStandbyNetworking,
@@ -73,7 +72,6 @@ param (
[switch]$DisableNotepadAI,
[switch]$DisableEdgeAI,
[switch]$DisableChromeAI,
[switch]$DisableSearchHighlights,
[switch]$DisableWidgets,
[switch]$HideChat,
[switch]$EnableEndTask,
+24
View File
@@ -104,4 +104,28 @@ Describe 'FeatureId parameter contracts' {
$missing | Should -HaveCount 0 -Because ($missing -join ', ')
}
It 'accounts for every Win11Debloat.ps1 parameter as a FeatureId or a control parameter' {
$tokens = $null
$parseErrors = $null
$ast = [System.Management.Automation.Language.Parser]::ParseFile($script:Win11DebloatPath, [ref]$tokens, [ref]$parseErrors)
$parseErrors | Should -BeNullOrEmpty
$assignment = $ast.Find({
param($node)
$node -is [System.Management.Automation.Language.AssignmentStatementAst] -and $node.Left.Extent.Text -eq '$script:ControlParams'
}, $true)
$assignment | Should -Not -BeNullOrEmpty
$controlParameters = @(
$assignment.Right.FindAll({ param($node) $node -is [System.Management.Automation.Language.StringConstantExpressionAst] }, $true) |
ForEach-Object { $_.Value }
)
$unaccounted = @(
Get-ScriptParameterNames -Path $script:Win11DebloatPath |
Where-Object { $script:Features.FeatureId -notcontains $_ -and $controlParameters -notcontains $_ }
)
$unaccounted | Should -HaveCount 0 -Because ($unaccounted -join ', ')
}
}
-2
View File
@@ -25,7 +25,6 @@ param (
[switch]$EnableWindowsSandbox,
[switch]$EnableWindowsSubsystemForLinux,
[switch]$DisableTelemetry,
[switch]$DisableSearchHistory,
[switch]$DisableFastStartup,
[switch]$DisableBitlockerAutoEncryption,
[switch]$DisableModernStandbyNetworking,
@@ -37,7 +36,6 @@ param (
[switch]$DisableBing,
[switch]$DisableNotifications,
[switch]$DisableStoreSearchSuggestions,
[switch]$DisableSearchHighlights,
[switch]$DisableDesktopSpotlight,
[switch]$HideDesktopSpotlightIcon,
[switch]$EnableDesktopSpotlight,