diff --git a/SRGAdminMenu.ps1 b/SRGAdminMenu.ps1 index 8936c56..7eca46e 100644 --- a/SRGAdminMenu.ps1 +++ b/SRGAdminMenu.ps1 @@ -271,6 +271,12 @@ function Do-RestartServiceMenu { } while ($true) } +function do-wingetupgrades { + winget upgrade --all --silent --accept-source-agreements --accept-package-agreements +} + + + # ------- Main Menu ------- do { Clear-Host @@ -280,6 +286,7 @@ do { Write-Host " 3) Show IP addresses" Write-Host " 4) Ping a host" Write-Host " 5) Restart a service (submenu)" + write-Host " 6) Run Winget Upgrades" Write-Host " 0) Quit`n" $choice = Read-Host "Choose an option" @@ -289,6 +296,7 @@ do { '3' { Do-ShowIP; Read-Host "`nPress Enter to return to menu" | Out-Null } '4' { Do-PingHost; Read-Host "`nPress Enter to return to menu" | Out-Null } '5' { Do-RestartServiceMenu } + '6' { do-wingetupgrades } '0' { exit } default { Write-Host "Invalid choice." -ForegroundColor Yellow