I was issued a new work laptop and had to go about the business of installing all my applications and configuring everything all over again. I use VMWare’s PowerCLI cmdlets in Powershell sometimes, so I had to go about reinstalling them:
PS C:\Users\Greg> Install-Module VCF.PowerCLI
NuGet provider is required to continue
Powershell requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PacakageManagement\ProviderAssemblies' or 'C:\Users\Greg\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5..201 -Force'. Doy you want PowerShellGet to install and import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
WARNING: Unable to download from URI 'https://onegetcdn.azureedge.net/providers/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll' to ''.
PackageManagement\Install-PackageProvider : Failed to bootstrap provider 'https://cdn.oneget.org/providers/nuget-2.8.5.208.package.swidtag'.
...
I decided to try downloading the file manually, only to find that it’s being blocked by our IT security group at work via. zScaler. Offline installation is one of the great IT downfalls in our current age of cloud/internet delivery - it’s often difficult to install software that relies on internet servers (and have dependencies that require internet downloads) unless you go piece by piece.
It turns out that the installation of NuGet is really easy for an offline machine:
- Download https://onegetcdn.azureedge.net/providers/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll from an internet-connected machine. Be sure to unblock the file (via. file properties > Unblock)
- Copy the .dll to C:\Program Files\PackageManagement\ProviderAssemblies on the offline machine
- Restart Powershell