Skip to content

Instantly share code, notes, and snippets.

@raandree
Created January 13, 2021 09:23
Show Gist options
  • Save raandree/5a6900a4755de7a42c8e633e748f51ba to your computer and use it in GitHub Desktop.
Save raandree/5a6900a4755de7a42c8e633e748f51ba to your computer and use it in GitHub Desktop.
Update a client to the newest PowerShellGet version
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
mkdir -Path C:\ProgramData\Microsoft\Windows\PowerShell\PowerShellGet -Force
Invoke-WebRequest -Uri 'https://nuget.org/nuget.exe' -OutFile C:\ProgramData\Microsoft\Windows\PowerShell\PowerShellGet\nuget.exe -ErrorAction Stop
Install-PackageProvider -Name NuGet -Force
Install-Module -Name PowerShellGet -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment