Files
Win11Debloat/Scripts/Features/BackupRegistryFeatureSelection.ps1

15 lines
364 B
PowerShell
Raw Permalink Normal View History

<#
.SYNOPSIS
Filters a list of features to those that have a non-empty RegistryKey.
.PARAMETER Features
An array of feature objects to filter.
#>
function Get-RegistryBackedFeatures {
param(
[object[]]$Features = @()
)
return @($Features | Where-Object { -not [string]::IsNullOrWhiteSpace([string]$_.RegistryKey) })
}