cibboy / PSDSCAgent

A Powershell Desired State Configuration agent written in Powershell
MIT License
0 stars 0 forks source link

Implementation of internal DSC resource File #5

Open cibboy opened 1 year ago

cibboy commented 1 year ago

In PsDesiredStateConfiguration v2.0 resource File is no longer supported (see https://learn.microsoft.com/en-us/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-2.0#notes and https://learn.microsoft.com/en-us/powershell/dsc/overview?view=dsc-2.0) as it is based on WMI. A workaround is needed to have full compatibility with mof configurations built with Windows Powershell.

A possible solution to the issue is implementing in Powershell an alternative resource (inside the PSDSCAgent module) - with a different name but same behavior - and have the process applying the configuration recognize old File resources and call the internal one instead. This way the solution is self-contained.

cibboy commented 1 year ago

Documentation