<# .SYNOPSIS Updates PowerShell to the latest stable version or specific version.
"Linux" $pwshPaths = @("/opt/microsoft/powershell/*")
else Write-ColorOutput "Download failed. Please check your internet connection and try again." "Red" exit 1
else Write-ColorOutput "Installation failed. Please check the error messages above." "Red" exit 1
"8" Write-Host "`nPlease use Windows Control Panel or system package manager to uninstall." -ForegroundColor Yellow Read-Host "Press Enter to continue"
if (-not $NoRestart) Write-ColorOutput "`nPlease restart PowerShell to use the new version." "Yellow" Read-Host "Press Enter to exit"