Open denelon opened 1 year ago
I might suggest improving the title so that a search finds it? "Reverse DSC" doesn't really allow someone who isn't on the team to understand it, and it would probably result in fewer duplicate bugs.
The work over at the PowerShell/DSC GitHub project is tracked via:
This would depend on:
We're thinking something like:
For getting the configuration from a single package (we're also thinking about a set of packages)
winget configure export <PackageID> -o *.dsc.yaml
For getting the entire configuration from all installed packages
winget configure export -o *.dsc.yaml
Description of the new feature / enhancement
I want to be able to generate a configuration based on my current machine.
~Reference work:~ ~https://devblogs.microsoft.com/scripting/reverse-desired-state-configuration-how-it-works/~
~There is likely some needed work to enable reverse DSC.~ ~We would need to "inspect" the current system, pull down associated DSC resources, and generate a configuration.~
Customer verbatim
jouni nieminen
Proposed technical implementation details
winget configure export <path to file>
This would iterate over installed packages and generate a WinGet Configuration. If an associated DSC resource is present in the manifest for the package, it would call "export" via DSC v3 and add the configuration as a dependency on install (using Microsoft.WinGet.DSC).Additionally, the export could include the Windows Settings using Microsoft.Windows.Developer.
Depends on: