mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 22:16:30 +00:00
18 lines
445 B
PowerShell
18 lines
445 B
PowerShell
# Returns the feature metadata for a parameter when it supports undo; otherwise returns $null.
|
|
function GetUndoFeatureForParam {
|
|
param (
|
|
[string]$paramKey
|
|
)
|
|
|
|
if (-not $script:Features -or -not $script:Features.ContainsKey($paramKey)) {
|
|
return $null
|
|
}
|
|
|
|
$feature = $script:Features[$paramKey]
|
|
if (-not ($feature.RegistryUndoKey -and $feature.UndoAction)) {
|
|
return $null
|
|
}
|
|
|
|
return $feature
|
|
}
|