Affected versions: Windows Server 2019

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution — Primary Fix
  7. Solution — Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

PackageManagement Install-Package on Windows Server 2019 fails because the requested provider cannot be located or two providers conflict.

Environment & Reproduction

Reproduces when scripts call Install-Package with a specific provider name that has been replaced or duplicated by a manual install.

Install-Package -Name 7zip -ProviderName Chocolatey

Root Cause Analysis

OneGet uses pluggable providers; missing provider DLLs, duplicate registrations, or version mismatches all break resolution.

Quick Triage

List all installed providers and look for duplicates.

Get-PackageProvider -ListAvailable
Get-PackageSource

Step-by-Step Diagnosis

Re-run install command with -Verbose to see provider selection logic.

Install-Package -Name 7zip -ProviderName Chocolatey -Verbose
Illustrative mockup for windows-server-2019 — terminal_or_powershell
Diagnostic output for packaging/oneget-provider — Illustrative mockup — Progressive Robot

Solution — Primary Fix

Remove the duplicate provider directory and reinstall the canonical version.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Remove-Item 'C:Program FilesPackageManagementProviderAssembliesChocolatey' -Recurse -Force
Install-PackageProvider -Name Chocolatey -Force
Import-PackageProvider Chocolatey
Illustrative mockup for windows-server-2019 — error_dialog
Resolution for packaging/oneget-provider — Illustrative mockup — Progressive Robot

Solution — Alternative Approaches

Switch to direct choco.exe CLI when OneGet provider integration is unstable.

choco install 7zip -y

Verification & Acceptance Criteria

Install-Package succeeds and Get-Package lists the new package.

Get-Package 7zip

Rollback Plan

Re-register a previously working provider version from backup folder.

Copy-Item D:backupChocolatey 'C:Program FilesPackageManagementProviderAssemblies' -Recurse

Prevention & Hardening

Standardise one provider per package source and document version in baseline configuration.

Get-PackageProvider | Format-Table Name,Version

Related: NuGet provider missing, PowerShellGet upgrade conflicts, and proxy authentication errors.

Related tutorial: View the step-by-step tutorial for Windows Server 2019.

View all Windows Server 2019 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Microsoft Learn documentation for PackageManagement OneGet providers.

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.