π ~1 min read
Table of contents
Symptom & Impact
PowerShell prompts to install the NuGet provider on Windows Server 2016 then fails, blocking module-based deployments.
Environment & Reproduction
Occurs on first use of Install-Module on a freshly built server where the bootstrap NuGet provider is not present.
Install-Module Az
Root Cause Analysis
PowerShellGet requires the NuGet provider 2.8.5.201 or later; without internet egress to nuget.org the bootstrap fails silently.
Quick Triage
Confirm the provider state and outbound connectivity to PowerShell gallery endpoints.
Get-PackageProvider -ListAvailable
Test-NetConnection www.powershellgallery.com -Port 443
Step-by-Step Diagnosis
Re-run with -Verbose to capture provider download attempt.
Install-PackageProvider -Name NuGet -Force -Verbose

Solution β Primary Fix
Install the NuGet provider explicitly and force PowerShellGet to refresh its providers list.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Import-PackageProvider NuGet -Force
Install-Module Az -Scope AllUsers -Force

Solution β Alternative Approaches
Copy the provider DLL from a working server to %ProgramFiles%PackageManagementProviderAssemblies for offline servers.
Copy-Item \peerC$Program' Files'PackageManagementProviderAssembliesnuget C:Program' Files'PackageManagementProviderAssemblies -Recurse
Verification & Acceptance Criteria
Get-PackageProvider lists NuGet at the required version and modules install successfully.
Get-PackageProvider NuGet | Select Name,Version
Rollback Plan
Remove the manually copied provider directory if it conflicts with later upgrades.
Remove-Item 'C:Program FilesPackageManagementProviderAssembliesnuget' -Recurse
Prevention & Hardening
Bake the NuGet provider into base server images to avoid first-run bootstrap failures.
Get-PackageProvider | Format-Table Name,Version
Related Errors & Cross-Refs
Related: TLS 1.2 negotiation errors, PSGallery untrusted policy, and proxy 407 authentication issues.
Related tutorial: View the step-by-step tutorial for Windows Server 2016.
View all Windows Server 2016 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Microsoft Learn documentation for PackageManagement providers and offline provider deployment.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.