mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 14:06:27 +00:00
21 lines
622 B
PowerShell
21 lines
622 B
PowerShell
# Generates a list of apps to remove based on the Apps parameter
|
|
function GenerateAppsList {
|
|
if (-not ($script:Params["Apps"] -and $script:Params["Apps"] -is [string])) {
|
|
return @()
|
|
}
|
|
|
|
$appMode = $script:Params["Apps"].toLower()
|
|
|
|
switch ($appMode) {
|
|
'default' {
|
|
$appsList = LoadAppsFromFile $script:AppsListFilePath
|
|
return $appsList
|
|
}
|
|
default {
|
|
$appsList = $script:Params["Apps"].Split(',') | ForEach-Object { $_.Trim() }
|
|
$validatedAppsList = ValidateAppslist $appsList
|
|
return $validatedAppsList
|
|
}
|
|
}
|
|
}
|