Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Question: Export to JSON functionality?

Open meggenberger opened this issue 2 years ago • 1 comments

Hi all.

So I have the need to extract the current settings of many of the parameters that are covered by Microsoft365DSC module. But I don't need it in an HTML format but preferably in a JSON or if nothing else is available a CSV might work.

Is this something that would fit in the plan for this module? I could try to to create the export functionality and in the end create a PR but I wanted to know if you think this would fit into this module before starting.

Cheers, Marc

meggenberger avatar Sep 23 '22 11:09 meggenberger

Hi, it is already possible to create in a report in JSON with the New-M365DSCReportFromConfiguration cmdlet. Type parameter accepts HTML, Excel and JSON.

https://microsoft365dsc.com/user-guide/cmdlets/New-M365DSCReportFromConfiguration/

malauter avatar Sep 23 '22 11:09 malauter

@meggenberger Were you able to export the configuration as JSON?

andikrueger avatar Sep 30 '22 13:09 andikrueger

Closing due to inactivity.

andikrueger avatar Oct 12 '22 07:10 andikrueger

@andikrueger @malauter : Please apologize. I missed the notifications of your answers. Yes. I had some initial struggles with getting the export of the current config to work but then I was able to create a Report in JSON. I have now a docker image with M365DSC installed that will pull my configured settings I need and export them as JSON. Thank you very much for your help.

meggenberger avatar Oct 19 '22 18:10 meggenberger

Good to hear!

With today's release (1.22.1019.1) there will be the option to get JSON output from these two cmdlets: New-M365DSCDeltaReport and Assert-M365DSCBlueprint

andikrueger avatar Oct 19 '22 18:10 andikrueger