Public/Xpand/Install-Xpand.ps1

function Install-Xpand {
    param (
        [string]$Version,
        [Switch]$Latest,
        [validateSet("Assemblies", "Nuget", "Source", "VSIX")]
        [string[]]$Assets = @("Assemblies", "Nuget", "Source", "VSIX"),
        [string]$InstallationPath = "$([Environment]::GetFolderPath('MyDocuments'))\eXpandFramework",
        [switch]$SkipGac
    )
    $ErrorActionPreference="Stop"
    [Net.ServicePointManager]::Expect100Continue=$true
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    $c=New-Object System.Net.WebClient
    $uri="https://raw.githubusercontent.com/eXpandFramework/XpandPosh/master/XpandPosh/Private/Xpand/InstallXpand.ps1"
    $scriptPath="$InstallationPath\InstallXpand.ps1"
    Write-Host "Downloading installation script from $uri into $scriptPath" -f Green
    New-Item $InstallationPath -ItemType Directory -Force -ErrorAction Continue
    if (Test-Path $scriptPath){
        Remove-Item $scriptPath
    }
    $c.DownloadFile($uri,$scriptPath)
    . $scriptPath
    $instalationParameters=@{
        Version=$Version
        Latest=$Latest
        Assets=$Assets
        InstallationPath=$InstallationPath
        ScipGac=$ScipGac
    }
    Write-Host "Installation parameters:"
    Write-Host $instalationParameters
    InstallXpand @instalationParameters

}