update powershell version

Update - Powershell Version [work]

else Write-ColorOutput "Installation failed with exit code: $($process.ExitCode)" "Red" return $false

Write-Host "`nInstalled PowerShell Versions:" -ForegroundColor Cyan foreach ($path in $pwshPaths) if (Test-Path $path) ForEach-Object $version = $_.Name $pwshPath = Join-Path $_.FullName "pwsh.exe" if (Test-Path $pwshPath) Write-Host " - Version $version : $($_.FullName)" update powershell version

.EXAMPLE .\Update-PowerShell.ps1 -Version 7.4.0 $msiArguments = @( "/i `"$InstallerPath`""

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

$msiArguments = @( "/i `"$InstallerPath`"", "/quiet", "/norestart", "ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1", "ENABLE_PSREMOTING=1", "REGISTER_MANIFEST=1" )

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