Specification: Native DSC v3 Resources in WinGet Client - #6291
Conversation
Specification for native command-based DSC v3 resources shipped with the WinGet client, including Package, PackageList, Source, Settings, and Pin resources. Eliminates ~92s adapter overhead per resource. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| | Resource Type | Purpose | DSC Operations | | ||
| |--------------|---------|----------------| | ||
| | `Microsoft.WinGet/Package` | Single package desired state | Get, Set, Test | | ||
| | `Microsoft.WinGet/PackageList` | Declarative list of packages | Get, Set, Test | |
There was a problem hiding this comment.
Feels like this could just be an extension of Microsoft.WinGet/Package where the parameters could be lists instead of single values, or settings is itself a list type?
| | `ensure` | enum | No | `present` \| `absent` | | ||
| | `trustLevel` | enum | No | `none` \| `trusted` | | ||
|
|
||
| ### Microsoft.WinGet/Settings |
There was a problem hiding this comment.
How do admin settings get set?
| winget dsc list # List available resources | ||
| ``` | ||
|
|
||
| The `winget dsc` subcommand is NOT intended for direct user interaction — it implements the DSC v3 protocol for the runtime to invoke. It does not appear in `winget --help` by default (hidden command, visible with `--verbose`). |
There was a problem hiding this comment.
winget dsc is currently an alias for winget configure
- Merge PackageList into Package (list mode via 'packages' array, single via 'id') - Document existing AdminSettings resource (requires elevation, separate from UserSettings) - Acknowledge existing winget dsc infrastructure; reframe spec as extending it - Clarify resource table: existing vs enhanced vs new resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
|
|
||
| The `winget dsc` subcommand is NOT intended for direct user interaction — it implements the DSC v3 protocol for the runtime to invoke. It does not appear in `winget --help` by default (hidden command, visible with `--verbose`). | ||
| > [!NOTE] | ||
| > `winget dsc` previously served as an alias for `winget configure`. With the existing resource protocol implementation in the client, `winget dsc` is now the dedicated entry point for DSC v3 resource operations. It is NOT intended for direct user interaction — it implements the DSC v3 protocol for the runtime to invoke. It does not appear in `winget --help` by default (hidden command, visible with `--verbose`). |
| "description": "Manage a single WinGet package", | ||
| "get": { | ||
| "executable": "winget", | ||
| "args": ["dsc", "get", "--resource", "Package"] |
There was a problem hiding this comment.
These aren't the correct args for winget - I believe the correct args are ["dscv3", "package", "--get"]
Use winget dscv3 package --manifest to get the actual manifest values
| | `scope` | enum | No | `machine` \| `user` | | ||
| | `ensure` | enum | No | `present` (default) \| `absent` \| `latest` | | ||
| | `enforcement` | enum | No | List mode only: `present` (default) \| `exact` | | ||
| | `installerType` | string | No | Preferred installer type | |
There was a problem hiding this comment.
Is this really a preference, or does it act as a requirement?
|
|
||
| **Set behavior in list mode:** | ||
| 1. For each package in the list, evaluate individually | ||
| 2. MSIX packages may be installed concurrently (up to 6 concurrent, matching existing WinGet behavior) |
There was a problem hiding this comment.
Not existing behavior - reference the specification in #6295 instead
|
|
||
| Admin settings are distinct from user settings — they control machine-wide WinGet behaviors and require administrator privileges to modify. | ||
|
|
||
| ### Microsoft.WinGet/Pin |
There was a problem hiding this comment.
Should this also be capable of taking a list, similar to the packages resource? Since it's a new resource, it could take only a list
|
|
||
| ### CLI Commands Affected | ||
|
|
||
| The `winget dsc` subcommand already exists and implements the DSC v3 command-based resource protocol: |
There was a problem hiding this comment.
This is not true - winget dsc is the equivalent of winget configure; The correct command which implements the resource protocol is winget dscv3
| winget dsc get --resource <type> # stdin: JSON, stdout: current state | ||
| winget dsc set --resource <type> # stdin: JSON, stdout: result | ||
| winget dsc test --resource <type> # stdin: JSON, stdout: test result | ||
| winget dsc schema --resource <type> # stdout: JSON schema | ||
| winget dsc list # List available resources |
There was a problem hiding this comment.
These are not correct - the implementation is winget dscv3 package --get or winget dscv3 source --test or winget dscv3 user-settings-file --manifest
The existing implementations should be respected and expanded upon for new types, not reworked
| > The resource operates in **single mode** when `id` is specified, and **list mode** when `packages` is specified. These are mutually exclusive — specifying both is an error. | ||
|
|
||
| **Test behavior:** | ||
| - `ensure: present` — true if package is installed with version matching constraint |
There was a problem hiding this comment.
Not sure if you want to fully align with the semantics of Microsoft DSC, but then I would introduce _exist.

📖 Description
Specification for native DSC v3 command-based resources shipped with the WinGet client. Extends the existing
winget dscinfrastructure (which already provides Package, Source, UserSettings, and AdminSettings resources) with enhanced capabilities and new resources.Key aspects:
id) and declarative list mode (packagesarray) for managing sets of packages as desired state.dsc.json) enable DSC v3 discovery without spawning WinGetChanges addressing review feedback (June 22):
PackageListintoPackageresource — usespackagesarray for list mode (simpler surface area per Trenly's suggestion)AdminSettingsresource — requiressecurityContext: elevated, is a separate resource from UserSettingswinget dscalready exists as the DSC v3 resource protocol handler; reframed spec as extending existing infrastructureAuthored with GitHub Copilot assistance.
🔗 References
Related Issues:
🔍 Validation
Spec document — no code changes to validate.
✅ Checklist
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow