I had a project requiring the Newtonsoft.Json libraries (NuGet – GitHub). I also wanted to play around a bit with OneGet as I hadn’t had a need to yet.
Powershell 5 (5.0.9926.2 as of this writing) makes this easy. Here’s about all that’s needed to get this running and access the entire NuGet.org package repository.
Register-PackageSource -Name NuGet -ProviderName Chocolatey -Location https://nuget.org/api/v2/ Get-PackageProvider -Name NuGet -ForceBootstrap Find-Package -ProviderName NuGet -Name Newtonsoft.Json | Install-Package