diff --git a/Scripts/GUI/MainWindow-AppSelection.ps1 b/Scripts/GUI/MainWindow-AppSelection.ps1 index 37490f8..e1ff603 100644 --- a/Scripts/GUI/MainWindow-AppSelection.ps1 +++ b/Scripts/GUI/MainWindow-AppSelection.ps1 @@ -233,9 +233,11 @@ function Get-AppRemovalScopeTarget { switch ($selectedItem.Name) { "AppRemovalScopeAllUsers" { return 'AllUsers' } "AppRemovalScopeCurrentUser" { return 'CurrentUser' } + default { + Write-Warning "Unrecognized app-removal scope item '$($selectedItem.Name)'. Defaulting to AllUsers." + return 'AllUsers' + } } - - return $null } function Invoke-AppPreset {