From b3524a883121c2ca2a529668d320b6cffbf65f20 Mon Sep 17 00:00:00 2001 From: "shaun.greatbatch" Date: Thu, 18 Sep 2025 12:12:57 +0100 Subject: [PATCH] Added a menu option for running winget upgrade from the menu --- SRGAdminMenu.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) 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