Add option to disable Windows search history, enable Windows Sandbox and enable WSL (#477)

* Add option to disable local Windows search history
* Add option to enable Windows Sandbox and WSL
This commit is contained in:
Jeffrey
2026-02-18 19:00:49 +01:00
committed by GitHub
parent e0e69c0ef5
commit 2c940ff489
8 changed files with 97 additions and 10 deletions

View File

@@ -24,7 +24,10 @@ param (
[switch]$ForceRemoveEdge,
[switch]$DisableDVR,
[switch]$DisableGameBarIntegration,
[switch]$EnableWindowsSandbox,
[switch]$EnableWindowsSubsystemForLinux,
[switch]$DisableTelemetry,
[switch]$DisableSearchHistory,
[switch]$DisableFastStartup,
[switch]$DisableBitlockerAutoEncryption,
[switch]$DisableModernStandbyNetworking,
@@ -877,8 +880,17 @@ function ExecuteParameter {
RemoveApps $appsList
return
}
"ForceRemoveEdge" {
ForceRemoveEdge
"EnableWindowsSandbox" {
Write-ToConsole "> Enabling Windows Sandbox..."
Enable-WindowsOptionalFeature -Online -FeatureName "Containers-DisposableClientVM" -All -NoRestart
Write-ToConsole ""
return
}
"EnableWindowsSubsystemForLinux" {
Write-ToConsole "> Enabling Windows Subsystem for Linux..."
Enable-WindowsOptionalFeature -Online -FeatureName "VirtualMachinePlatform" -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -All -NoRestart
Write-ToConsole ""
return
}
'ClearStart' {
@@ -1045,6 +1057,14 @@ function RestartExplorer {
return
}
if ($script:Params.ContainsKey("EnableWindowsSandbox")) {
Write-ToConsole "Warning: The Windows Sandbox feature will only be available after a reboot" -ForegroundColor Yellow
}
if ($script:Params.ContainsKey("EnableWindowsSubsystemForLinux")) {
Write-ToConsole "Warning: The Windows Subsystem for Linux feature will only be available after a reboot" -ForegroundColor Yellow
}
if ($script:Params.ContainsKey("DisableMouseAcceleration")) {
Write-ToConsole "Warning: Changes to the Enhance Pointer Precision setting will only take effect after a reboot" -ForegroundColor Yellow
}