This guide explains how to convert an existing WinGet Configuration file from the DSC v0.2 schema ("v2") to the dscv3 processor schema ("v3").
DSC v3 is the current recommended schema for new WinGet configurations:
- Cross-platform foundation — Built on the new DSC v3 engine (Rust-based, cross-platform)
- Simplified structure — Flatter YAML, fewer nested layers
- Better performance — Resource evaluation can be significantly faster for certain resource types
- Active development — New features and resources target v3 first
v2:
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
configurationVersion: 0.2
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
...v3:
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.3
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
metadata:
winget:
processor:
identifier: "dscv3"
resources:
- name: winget_Git.Git
type: Microsoft.WinGet/Package
...| Field | v2 | v3 |
|---|---|---|
| Resource type | resource: Microsoft.WinGet.DSC/WinGetPackage |
type: Microsoft.WinGet/Package |
| Resource name | id: winget_Git.Git (in directives) |
name: winget_Git.Git (top-level) |
| Description | directives.description |
metadata.description |
| Settings/Properties | settings: block |
properties: block |
| Security context | directives.securityContext: elevated |
metadata.winget.securityContext: "elevated" |
| Dependencies | dependsOn: [resource_id] |
dependsOn: [- resource_name] |
| Purpose | v2 Resource | v3 Resource |
|---|---|---|
| Install a package | Microsoft.WinGet.DSC/WinGetPackage |
Microsoft.WinGet/Package |
| WinGet user settings | Microsoft.WinGet.DSC/WinGetUserSettings |
Microsoft.WinGet/UserSettingsFile |
| WinGet admin settings | Microsoft.WinGet.DSC/WinGetAdminSettings |
Microsoft.WinGet/AdminSettings |
| Windows settings | Microsoft.Windows.Developer/... |
Microsoft.Windows.Settings/WindowsSettings |
| Run a command | PSDscResources/Script |
Microsoft.DSC.Transitional/RunCommandOnSet |
v2:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: winget_Git.Git
directives:
description: "Install Git.Git"
securityContext: elevated
settings:
id: "Git.Git"
source: "winget"v3:
- name: winget_Git.Git
type: Microsoft.WinGet/Package
metadata:
description: "Install Git.Git"
winget:
securityContext: "elevated"
properties:
id: "Git.Git"
source: "winget"The winget-config-v2-to-v3 Copilot CLI skill can convert your configuration interactively:
- Open a Copilot CLI session in the directory containing your v2 config
- Ask: "Convert my v2 WinGet Configuration to v3"
- Copilot will read your file and produce the v3 equivalent
The skill handles all structural transformations, resource type mapping, and metadata reorganization.
If your v2 config is outdated anyway, start fresh:
# Export current machine state in v3 format
winget configure export -o my-export-v3.wingetThen curate the export using the configuration as code lifecycle.
Follow the structural changes above to convert each resource by hand. Best for small configs or when you want to understand every change.
For detailed samples, a complete conversion guide, and DSC v3 resource examples, see the microsoft/winget-dsc repository:
- DscResources samples — v3 resource usage examples
- Conversion guide — Comprehensive v2→v3 migration documentation
| Issue | Solution |
|---|---|
allowPrerelease not working |
In v3, use -AllowPrerelease in RunCommandOnSet for module installs, not a directive flag |
| Resources running without elevation | Move securityContext from directives to metadata.winget.securityContext |
| Dependencies not resolving | Ensure dependsOn references use the name field value, not id |
| Settings resource not found | Resource type names changed (see mapping table above) |