Instantly share code, notes, and snippets.

What would you like to do?
The PowerShell script that can be used to download latest version of Istio analogus to
[string] $IstioVersion = "0.3.0"
$url = "$($IstioVersion)/istio_$($IstioVersion)"
$Path = Get-Location
$output = [IO.Path]::Combine($Path, "istio_$($IstioVersion)”)
Write-Host "Downloading Istio from $url to path " $Path -ForegroundColor Green
#Download file
(New-Object System.Net.WebClient).DownloadFile($url, $output)
# Unzip the Archive
Expand-Archive $output -DestinationPath $Path
#Set the environment variable
$IstioHome = [IO.Path]::Combine($Path, "istio-$($IstioVersion)")
[Environment]::SetEnvironmentVariable("ISTIO_HOME", "$IstioHome", "User")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment