Update Powershell Version Link Link

try $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($DownloadUrl, $DestinationPath) Write-ColorOutput "Download completed: $DestinationPath" "Green" return $true

function Get-OSPlatform if ($env:OS -eq "Windows_NT") return "Windows" update powershell version

# Cleanup if ($Cleanup -and (Test-Path $installerPath)) Remove-Item -Path $installerPath -Force Write-ColorOutput "Cleaned up installation files." "Gray" try $webClient = New-Object System

$extractPath = "/tmp/powershell" New-Item -ItemType Directory -Path $extractPath -Force update powershell version

switch ($os) "Windows" $pwshPaths = @( "$env:ProgramFiles\PowerShell\*", "$env:LocalAppData\Microsoft\PowerShell\*" ) "macOS" $pwshPaths = @("/usr/local/microsoft/powershell/*") "Linux" $pwshPaths = @("/opt/microsoft/powershell/*")

function Install-OnMacOS param( [string]$InstallerPath, [string]$Version )

$config = Get-Content $configPath do Show-Menu $choice = Read-Host "Select option"