mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 14:06:27 +00:00
Add option to disable MS Store app results in Windows Search (#509)
This also includes: * Update README for DisableSearchHighlights and DisableFindMyDevice * Extracted more logic from main script into separate scripts * Add event handler for tab changes to regenerate overview
This commit is contained in:
16
Scripts/Features/EnableWindowsFeature.ps1
Normal file
16
Scripts/Features/EnableWindowsFeature.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
# Enables a Windows optional feature and pipes its output to the console
|
||||
function EnableWindowsFeature {
|
||||
param (
|
||||
[string]$FeatureName
|
||||
)
|
||||
|
||||
$result = Invoke-NonBlocking -ScriptBlock {
|
||||
param($name)
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName $name -All -NoRestart
|
||||
} -ArgumentList $FeatureName
|
||||
|
||||
$dismResult = @($result) | Where-Object { $_ -is [Microsoft.Dism.Commands.ImageObject] }
|
||||
if ($dismResult) {
|
||||
Write-Host ($dismResult | Out-String).Trim()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user