Install NuGet via PowerShell script

BaltoStar picture BaltoStar · May 20, 2013 · Viewed 119.6k times · Source

As far as I can tell, NuGet is meant to be installed as a Visual Studio extension:

http://docs.nuget.org/docs/start-here/installing-nuget

But what if I need NuGet on a machine that doesn't have VS installed?

Specifically, I would like to install NuGet with a PowerShell script.

Answer

Syam Kallada picture Syam Kallada · Apr 16, 2020
  1. Run Powershell with Admin rights
  2. Type the below PowerShell security protocol command for TLS12:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12