Skip to content

Extend native DSC v3 resources in WinGet Client (PackageList, Pin, and installer type) #6289

Description

Relevant area(s)

  • DSC Resource
  • WinGet CLI

Description of the new feature / enhancement

Extend the native DSC v3 command resources shipped with the WinGet client to cover package-set
convergence and package pins while improving package installer selection.

WinGet already provides these native resources:

  • Microsoft.WinGet/Package
  • Microsoft.WinGet/Source
  • Microsoft.WinGet/UserSettingsFile
  • Microsoft.WinGet/AdminSettings

The remaining enhancements are:

  • Add an optional per-package installerType requirement to package resources.
  • Add Microsoft.WinGet/PackageList for declaring a package set with guarded DSC _purge
    semantics.
  • Add Microsoft.WinGet/Pin for declarative package pin management.
  • Export WinGet Configuration files using native resources.

Native command resources avoid the PowerShell adapter overhead required by the
Microsoft.WinGet.DSC class-based resources.

Proposed technical implementation details

Users author, test, and apply the resources through winget configure. The existing winget dsc
alias remains equivalent to winget configure.

The implementation-facing winget dscv3 commands continue to implement the DSC command-resource
protocol used by the resource manifests:

  • winget dscv3 <resource> --get
  • winget dscv3 <resource> --set
  • winget dscv3 <resource> --test
  • winget dscv3 <resource> --export
  • winget dscv3 <resource> --schema
  • winget dscv3 <resource> --manifest

Microsoft.WinGet/PackageList should:

  • accept package-specific source, version, installer type, install mode, and agreement settings
  • treat installerType as a requirement when specified
  • support opt-in _purge behavior that defaults to false
  • remove only packages WinGet can establish were authoritatively managed by WinGet
  • never remove unknown, best-effort-correlated, protected, or unsupported Windows software
  • require an enabling Group Policy before processing _purge: true

Microsoft.WinGet/Pin should manage one pin per resource instance and use DSC _exist for removal.

Specification: #6291

Metadata

Metadata

Assignees

No one assigned

    Labels

    DSC-ResourceIssue related to DSC ResourcesIssue-FeatureThis is a feature request for the Windows Package Manager client.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions