Add support for Add-DhcpServerSecurityGroup
Support for Add-DhcpServerSecurityGroup would be nice to have, so as to create the DHCP Administrators and the DHCP Users groups. This is easily worked around with a script resource, but it would be nice to be included in this Resource Module.
I've recently stumbled upon this problem while working with DSC. @kwirkykat I'm happy to do the work. Do you think this should be in it's own resource with a single "Ensure" variable, or could this go into xDhcpServerAuthorization (I already have the code written in there but I can split it out).
I agree, this is a necessary addition to make the resource really "no touch"
@LiamFisher92 Is there any instance outside xDhcpServerAuthorization where it would be useful to be able to create the DHCP Administrators and the DHCP Users groups? My first guess is 'probably'. If yes or maybe, it should be its own resource. If no, it can just be a part of xDhcpServerAuthorization via a parameter
@kwirkykat I can't think of a reason you would need the security groups without authorizing the DHCP server. Would splitting them out not lead to potential fully set-up unauthorized DHCP servers floating around? I'd be happy to shift them around if somebody else can think of one? I'm conscious of the fact I might lose the code I've already done so I'll submit a PR for now.
@LiamFisher92 Ok. If there is no reason to split it out, then the security group creation should stay in xDhcpServerAuthorization
@kwirkykat I'm not really a DHCP expert (I'm a games development graduate in disguise) so I can't really give you a definitive answer. Do you know anyone who could?
@LiamFisher92 I'll ask around
I think this should be a separate resource - having the DHCP server authorized (Ensure -eq 'Present') or not authorized (Ensure -eq 'Absent'), is not the same as having local security groups present or absent (not sure it's easy to remove them iether once created?).
I suggest a new resource DhcpLocalSecurityGroups is created. The existing PR #33 could might be changed for this.