Created
April 22, 2017 01:34
-
-
Save capoferro/3e2418347039333ea4f91707e6e4dab7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tempPath = Join-Path $env:TEMP "dnvminstall" | |
$dnvmPs1Path = Join-Path $tempPath "dnvm.ps1" | |
$dnvmCmdPath = Join-Path $tempPath "dnvm.cmd" | |
Write-Host "Using temporary directory: $tempPath" | |
if (!(Test-Path $tempPath)) { md $tempPath | Out-Null } | |
$webClient = New-Object System.Net.WebClient | |
$webClient.Proxy = [System.Net.WebRequest]::DefaultWebProxy | |
$webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials | |
Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path" | |
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/b77ee2c7d112d3c151d7546c1f8a094b6cb798d6/dnvm.ps1', $dnvmPs1Path) | |
Write-Host "Downloading DNVM.cmd to $dnvmCmdPath" | |
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/b77ee2c7d112d3c151d7546c1f8a094b6cb798d6/dnvm.cmd', $dnvmCmdPath) | |
Write-Host "Installing DNVM" | |
& $dnvmCmdPath setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment