microsoft / microsoft/winget-cli

[DSC Resource] Expose more settings to Microsoft.WinGet/Packages

Open
#3,401 8 comments 25 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Configure DSC-Resource 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'm migrating over to winget configure from my bespoke winget install scripts, and am running into some missing features in WinGetPackage. This is a request to expose more of winget install and Install-WinGetPackage's settings via Microsoft.WinGet.DSC/WinGetPackage so they can be used with winget configure, and devhome.

Notably missing --custom and --scope for my needs.
I imagine some people would require --location and --architecture, and --override to make use of this feature as well.

For my current needs these only need to be set during install/upgrade.

In the long term it would be nice to have Microsoft.WinGet.DSC/WinGetPackage go down the re-install/upgrade path if say the location, scope, or custom/override settings change. But this should be a seperate ticket once both this ticket and https://github.com/microsoft/winget-cli/issues/3281 are complete!

Sorry @denelon, you knew this was coming😄

Proposed technical implementation details

Adding more settings here:
https://github.com/microsoft/winget-cli/blob/e4b9205cff88701b2ad1078dd8ed311ac716b8b6/src/PowerShell/Microsoft.WinGet.DSC/Microsoft.WinGet.DSC.psm1#L545C12-L549C14

Like so: https://github.com/microsoft/winget-cli/blob/master/src/PowerShell/Microsoft.WinGet.Client/Examples/Sample_InstallPackage.ps1#L25

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 in src/PowerShell/Microsoft.WinGet.DSC/Microsoft.WinGet.DSC.psm1 around the referenced settings and compare the parameters in Microsoft.WinGet.Client/Examples/Sample_InstallPackage.ps1. Trace how WinGetPackage handles install and upgrade operations. Done means the requested custom and scope settings, plus the other listed install options where appropriate, can be supplied through the DSC resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.