mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-07-20 21:10:20 +08:00
24 lines
664 B
PowerShell
24 lines
664 B
PowerShell
<#
|
|
.SYNOPSIS
|
|
Builds the validated application-removal list from the Apps parameter.
|
|
#>
|
|
function Generate-AppsList {
|
|
if (-not ($script:Params["Apps"] -and $script:Params["Apps"] -is [string])) {
|
|
return @()
|
|
}
|
|
|
|
$appMode = $script:Params["Apps"].toLower()
|
|
|
|
switch ($appMode) {
|
|
'default' {
|
|
$appsList = Import-AppsFromFile $script:AppsListFilePath
|
|
return $appsList
|
|
}
|
|
default {
|
|
$appsList = $script:Params["Apps"].Split(',') | ForEach-Object { $_.Trim() }
|
|
$validatedAppsList = Get-ValidatedAppList $appsList
|
|
return $validatedAppsList
|
|
}
|
|
}
|
|
}
|