Author Posts

March 3, 2017 at 6:54 pm

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.

March 6, 2017 at 5:37 pm

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.

March 9, 2017 at 2:18 pm

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