Skip to content

Instantly share code, notes, and snippets.

@SQLDBAWithABeard
Created November 26, 2019 14:43
Show Gist options
  • Save SQLDBAWithABeard/5d36cd1401f1496f9b09ee3354a4d3d9 to your computer and use it in GitHub Desktop.
Save SQLDBAWithABeard/5d36cd1401f1496f9b09ee3354a4d3d9 to your computer and use it in GitHub Desktop.
Fixing Azure DevOps Deployment
$Profilepowershellget = "$env:userprofile\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\"
if(-Not(Test-Path $Profilepowershellget)){
New-Item $Profilepowershellget -ItemType Directory
}
$Url = 'https://dist.nuget.org/win-x86-commandline/v5.1.0/nuget.exe'
$OutputFile = "$Profilepowershellget\nuget.exe"
$StartTime = Get-Date
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($Url, $OutputFile)
Write-Output "Time taken: $((Get-Date).Subtract($StartTime).Seconds) second(s)"
Unblock-File $OutputFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment