p0w3rsh3ll / AdobeGPOTemplates

Other
11 stars 3 forks source link

Separate template-templates to separate files? #8

Open gaelicWizard opened 3 years ago

gaelicWizard commented 3 years ago

I'd like to try my hand at separating the script logic from the ADMX/ADML template-templates. Would that be worthwhile to prepare a PR for?

The idea would be to make it easier to update/expand the ADMX without having to @'quote'@ and syntax and all that in the PSM1. Should make it easier to validate the xml too

p0w3rsh3ll commented 3 years ago

Yes, you can fork the repo and do what you said. The quote in the PSM1 is a here string (double quoted) where the version, the name of the product are injected. The other way to do this is to have a static here string (single quote). You write to a file, then read its content and replace with another version, product name,... Adding some XML validation is also a good idea and something that could be added directly after generating the files or it can be added in a Pester test where you'd say that the XML generated should be valid.