Author Posts

November 10, 2015 at 3:29 am

Hi guys,

So I have a DSC system set up and is working fairly well, however I would like to automate some of the Environment data setup. I have defined my environment data much like the examples in the documentation

I can then read this data like so

$content = (Invoke-Expression(Get-Content $dataFile | Out-String ))

I would like to be able to set some of the details (easy enough) and then write it back to file (not so easy it seems). Does anyone know of any command that will let me serialize it back to a string so it can be written to file in much the same format as in the above documentation example?

November 13, 2015 at 11:47 am

There's nothing natively built-in – I'm not sure this is a use case that the team explicitly planned for.