Using PowerShell DSC to configure GPO?

Hello there,

This might seem like an odd question - but would it be possible to configure GPO (e.g. add/update) using PowerShell DSC?

Tried searching around but there does not seem to be any answers for this.

Thank you!

I haven’t used DSC in a long while, so I no longer know what exists or doesn’t. I know that it IS possible. I have done it adding a new GPO and then GP settings using a script resource, but I’m not sure if script resources are a thing anymore. I didn’t see anything in the DSC resource kit that would do it. The downside is that the configuration needs to be run as an account with access to edit or create GPOs, which means you need credential encryption. You might be better off just figuring out what registry keys to set (and set them with DSC) rather than put it in a GPO.

This code is ancient, but I’m including it if you want to look at a sample. YMMV. https://github.com/majst32/PKIDSC/blob/master/Original%20Code/PKIDeploy.ps1