Updating MULTI_SZ registry values using DSC

Welcome Forums DSC (Desired State Configuration) Updating MULTI_SZ registry values using DSC

This topic contains 2 replies, has 2 voices, and was last updated by

1 year, 11 months ago.

  • Author
  • #65767

    Points: 0
    Rank: Member

    I've successfully used DSC to apply registry changes with single values like DWORDS and strings. I flip the Force flag on, and it replaces whatever is there with the value I want.

    However, I have a project now that would require adding a value to a MULTI_SZ with existing values. I don't want to remove what's already there – just append an additional value. I haven't come across any examples where people have done anything similar, and I didn't find any logic to handle this in a cursory read of the registry resource code.

    Can the registry resource be used as-is to append values rather than replace, or do I need to just create some custom code in my script? I can do the latter easily enough, but I'd much prefer to keep my configuration code as clean as possible.

  • #65886

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    You'd have to do something custom – and I'd consider either extending the existing Registry resource (and submitting a pull request so Microsoft accepts your changes), or a new DSC resource entirely.

    • #65982

      Points: 0
      Rank: Member

      I've been wanting to contribute to a larger project, so I guess I just signed myself up for this one. Thank you!

The topic ‘Updating MULTI_SZ registry values using DSC’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort