From 6886d42010711f12cb93c0b23d14ff1810dddf00 Mon Sep 17 00:00:00 2001 From: "shaun.greatbatch" Date: Thu, 18 Sep 2025 12:51:22 +0100 Subject: [PATCH] removed unused menu options --- SRGAdminMenu.ps1 | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/SRGAdminMenu.ps1 b/SRGAdminMenu.ps1 index d4d574b..aeda3ed 100644 --- a/SRGAdminMenu.ps1 +++ b/SRGAdminMenu.ps1 @@ -207,18 +207,6 @@ function Do-RemoveAppxMenu { } while ($true) } -function Do-ShowIP { - Get-NetIPAddress -AddressFamily IPv4 | - Select-Object InterfaceAlias, IPAddress | - Sort-Object InterfaceAlias | - Format-Table -AutoSize -} - -function Do-PingHost { - $h = Read-Host "Enter host or IP" - if ($h) { Test-Connection -TargetName $h -Count 4 | Format-Table Address, Latency -Auto } -} - function Do-RestartServiceMenu { do { Clear-Host @@ -282,20 +270,16 @@ do { Write-Host "=== My Admin Menu ===" -ForegroundColor Cyan Write-Host " 1) Connect to a machine (Enter-PSSession as current user)" Write-Host " 2) Remove Windows apps (local or remote)" - 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 " 3) Restart a service (submenu)" + write-Host " 4) Run Winget Upgrades" Write-Host " 0) Quit`n" $choice = Read-Host "Choose an option" switch ($choice) { '1' { Do-ConnectRemote } '2' { Do-RemoveAppxMenu } - '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 } + '3' { Do-RestartServiceMenu } + '4' { do-wingetupgrades } '0' { exit } default { Write-Host "Invalid choice." -ForegroundColor Yellow