Saving a DSC data file

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 2 years, 6 months ago.

  • Author
  • #31845

    Alexis Coles

    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?

  • #31940

    Don Jones

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

You must be logged in to reply to this topic.