Update Powershell Version Portable Link

.PARAMETER Channel Update channel: "Stable" (default) or "LTS" (Long Term Support).

#endregion Main Execution <# .SYNOPSIS Wrapper script with additional features for PowerShell update management. #> function Show-Menu Clear-Host Write-Host "PowerShell Update Manager" -ForegroundColor Cyan Write-Host "========================" -ForegroundColor Cyan Write-Host "1. Check for updates" Write-Host "2. Update to latest stable version" Write-Host "3. Update to latest LTS version" Write-Host "4. Update to preview version" Write-Host "5. Install specific version" Write-Host "6. Show current version info" Write-Host "7. List installed versions" Write-Host "8. Uninstall PowerShell version" Write-Host "9. Configure auto-updates" Write-Host "0. Exit" Write-Host "" update powershell version

switch ($OS) "Windows" return "win-x64\.msi$" "macOS" return "osx-x64\.pkg$" "Linux" return "linux-x64\.tar\.gz$" default return ".*" Check for updates" Write-Host "2

switch ($choice) "1" Write-Host "`nChecking for updates..." -ForegroundColor Yellow & ".\Update-PowerShell.ps1" -WhatIf Read-Host "`nPress Enter to continue" "2" & ".\Update-PowerShell.ps1" -Channel Stable -Cleanup "3" & ".\Update-PowerShell.ps1" -Channel LTS -Cleanup "4" & ".\Update-PowerShell.ps1" -Preview -Cleanup "5" $version = Read-Host "Enter version number (e.g., 7.4.0)" & ".\Update-PowerShell.ps1" -Version $version -Cleanup "6" Show-CurrentVersionInfo Read-Host "`nPress Enter to continue" "7" List-InstalledVersions Read-Host "`nPress Enter to continue" "8" Write-Host "`nPlease use Windows Control Panel or system package manager to uninstall." -ForegroundColor Yellow Read-Host "Press Enter to continue" "9" Configure-AutoUpdates Update to preview version" Write-Host "5

[Parameter(Mandatory = $false)] [switch]$Force,