microsoft / winget-dsc

MIT License
24 stars 14 forks source link

PowerShell DSC 3.0 Demo #1

Closed msftrubengu closed 1 year ago

msftrubengu commented 2 years ago

This is a proof of concept of using PowerShell DSC 3.0 and a custom resource and module. WinDSC module will take an input.json and call Invoke-DSCResource per package. The DSC resource just creates registry key to say that is doing something.

The demo works with:

Using Windows PowerShell 5.1 is just for completeness.

Currently the only issue is the requirement of adding DscResourceInfo.cs from https://github.com/PowerShell/PSDesiredStateConfiguration/blob/master/src/PSDesiredStateConfiguration/helpers/DscResourceInfo.psm1 . I couldn't manage to make it load normally via a runspace or Import-Module, but maybe we could get that file and sign it, but hopefully we can get a better solution in the final product that doesn't require it.

TODO: