microsoft / microsoft/winget-cli

Add support to export configuration for WinGet administrator settings

Open
#4,211 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Configure Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

I want to be able to export the WinGet adminitrator settings using winget configure export.

The syntax might initially look like:
winget configure export --package Microsoft.AppInstaller --module Microsoft.WinGet.DSC --resource WinGetAdministratorSettings --output exported.configuration.dsc.yaml

The DSC Resource would return the object containing the JSON formatted collection of settings suitable for WinGet to generate a configuration file.

The configuration file would contain the YAML necessary to install WinGet (Microsoft.AppInstaller) and then apply the administrator settings as they are configured on Windows for the current user.

Note: The dependsOn keyword would ensure the settings aren't applied until after WinGet is installed/upgraded.

Related to:

Proposed technical implementation details

Implement the new export method in a PowerShell DSC v2 class-based resource so I can capture the user settings for WinGet.

WinGet would likely need a new PowerShell cmdlet like "Export-DscResource" to call the export method on the resource. If no export method is available, the cmdlet would provide the appropriate error so WinGet as an orchestrator could provide this information to the user.

These are typically the settings only an administrator can apply. A few are included below for reference:

  • Local Manifest Files
  • Installer Hash Override
  • Local Archive Malware Scan Override

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing related issues #3274 and #4210 and PowerShell/DSC PR #307, then trace the proposed winget configure export flow and the PowerShell DSC v2 class-based resource. Done means the command can export the current WinGet administrator settings into a configuration file and reports an appropriate error when no export method is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.