From 27a97e4650649b7623d952b75db8786644278ac3 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Fri, 7 Mar 2025 18:21:14 +0100 Subject: [PATCH] Update functions/public/Invoke-WPFUpdateMGMGT.ps1 Co-authored-by: Mr.k --- functions/public/Invoke-WPFUpdateMGMGT.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/public/Invoke-WPFUpdateMGMGT.ps1 b/functions/public/Invoke-WPFUpdateMGMGT.ps1 index 072879f7..41369988 100644 --- a/functions/public/Invoke-WPFUpdateMGMGT.ps1 +++ b/functions/public/Invoke-WPFUpdateMGMGT.ps1 @@ -4,6 +4,11 @@ function Invoke-WPFUpdateMGMT { [switch]$All ) + if ((-not $Selected -and -not $All) -or ($Selected -and $All)) { + Write-Host "[Invoke-WPFUpdateMGMT] Use either 'Selected' or 'All' switches, used switches are: 'Selected' is $Selected, 'All' is $All" -ForegroundColor Red + return + } + $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) if ($All) {