~5.x versions of PowerShell have a nuget package source included by default but it doesn't work:

PS > Get-PackageSource Name ProviderName IsTrusted Location ---- ------------ --------- -------- nuget.org NuGet False https://api.nuget.org/v3/index.json PSGallery PowerShellGet False https://www.powershellgallery.com/api/v2/

If you Unregister-PackageSource -Source nuget.org and Register-PackageSource -Location https://www.nuget.org/api/v2 -name nuget.org -Trusted I have been able to install nuget papckages with just Install-Package from PowerShell, not within visual studio. Got the idea from this SO answer.

I don't know what other possible negative impacts there are to removing the v3 version of the nuget.org source but I have been running this way for a while and things appear ok, your mileage may vary.

As an alternative here is an example that gets the job done by pulling down the nuget.exe even if it is a crummy way to have to do this: