The Windows operating system ships with (the meta-package manager), but it does not ship with all package providers pre-installed. The default installation includes only the provider for MSI and (sometimes) the legacy PowerShellGet v1.0. The NuGet provider—which is required to query repositories like https://www.powershellgallery.com/api/v2 —must be bootstrapped on demand or manually installed.

if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) $params.Scope = 'CurrentUser'

# Set TLS 1.2 for modern NuGet feeds [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $params = @ Name = 'NuGet' Force = $true ErrorAction = 'Stop'

PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. Or worse:

Install-packageprovider -name Nuget -force Today

The Windows operating system ships with (the meta-package manager), but it does not ship with all package providers pre-installed. The default installation includes only the provider for MSI and (sometimes) the legacy PowerShellGet v1.0. The NuGet provider—which is required to query repositories like https://www.powershellgallery.com/api/v2 —must be bootstrapped on demand or manually installed.

if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) $params.Scope = 'CurrentUser' install-packageprovider -name nuget -force

# Set TLS 1.2 for modern NuGet feeds [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $params = @ Name = 'NuGet' Force = $true ErrorAction = 'Stop' The Windows operating system ships with (the meta-package

PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. Or worse: install-packageprovider -name nuget -force