mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 14:06:27 +00:00
Add option to revert previous changes to windows defaults
This commit is contained in:
17
Scripts/Helpers/GetUndoFeatureForParam.ps1
Normal file
17
Scripts/Helpers/GetUndoFeatureForParam.ps1
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user