almenscorner / IntuneCD

Tool to backup, update and document configurations in Intune
MIT License
290 stars 38 forks source link

[FEATURE] Decode additional properties in base64 #111

Closed aaronparker closed 1 year ago

aaronparker commented 1 year ago

Here's additional payloads that are in base64 format. Apologies, I should have checked for more - this is what's in my current as-built, so there could be more properties.

Each of these has a property of scriptContent in base64 format.

almenscorner commented 1 year ago

Question is, do you want a potentially large script documented in line in the PDF?

almenscorner commented 1 year ago

Granted I'm not a Windows expert and don't really know how large these scripts can be, just asking ☺️

aaronparker commented 1 year ago

I say yes - could decoding be an optional parameter?

Because I'm automating the as-built with IntuneCD, it doesn't matter how long the PDF is.

almenscorner commented 1 year ago

@aaronparker, I have added the -d argument to IntuneCD-startdocumentation in #112. When set, IntuneCD will attempt to detect all base64 strings and decode them in the documentation.

You can test it by installing the latest beta -> pip install IntuneCD==1.4.7b1.

aaronparker commented 1 year ago

Works great. 👌

It does create some strange rendering issues which must be a result of special characters in the scripts. However, the document formats better, especially a PDF.

ScreenShot 2023-05-28 at 19 58 57

HTML view of the above

ScreenShot 2023-05-28 at 20 06 29

almenscorner commented 1 year ago

As long as the MD and PDF looks good I think it's enough :)