Using PowerShell DSC to configure GPO?

Welcome Forums DSC (Desired State Configuration) Using PowerShell DSC to configure GPO?

Viewing 1 reply thread
  • Author
    • #260919
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      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!

    • #260973
      Topics: 2
      Replies: 30
      Points: 100
      Team Member
      Rank: Participant

      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.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.