Update Powershell Version ^hot^ May 2026

Configure-AutoUpdates # Recursively show menu again do Show-Menu $choice = Read-Host "Select option"

function List-InstalledVersions $os = if ($env:OS -eq "Windows_NT") "Windows" elseif ($IsMacOS) "macOS" elseif ($IsLinux) "Linux"

[Parameter(Mandatory = $false)] [switch]$Cleanup, update powershell version

.EXAMPLE .\Update-PowerShell.ps1

function Show-CurrentVersionInfo Write-Host "`nPowerShell Version Information:" -ForegroundColor Cyan Write-Host " Version: $($PSVersionTable.PSVersion)" Write-Host " Edition: $($PSVersionTable.PSEdition)" Write-Host " GitCommitId: $($PSVersionTable.GitCommitId)" Write-Host " OS: $($PSVersionTable.OS)" Write-Host " Platform: $($PSVersionTable.Platform)" update powershell version

function Configure-AutoUpdates ConvertFrom-Json

.PARAMETER Preview Install the latest preview version instead of stable. update powershell version

if ($releaseNotes) Write-ColorOutput "Release Notes: $releaseNotes" "Gray" Write-ColorOutput "" $confirmation = Read-Host "Do you want to update PowerShell from $currentVersion to $targetVersion? (Y/N)" if ($confirmation -ne 'Y' -and $confirmation -ne 'y') Write-ColorOutput "Update cancelled." "Yellow" exit 0 Download installer $tempPath = [System.IO.Path]::GetTempPath() $installerExtension = switch ($os) "Windows" ".msi" "macOS" ".pkg" "Linux" ".tar.gz"