DSC groups question

Freek Brouwer 1 Reputation point
2020-07-21T13:29:32.39+00:00

Dear all, I have a question, i`m trying to setup a DSC form for lack of a better name. What i want to do is force that certain local groups remain empty. This as you cannot remove the built-in accounts of course.
I have the following bit below

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,255 questions
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,416 Reputation points
    2020-07-26T06:06:31.943+00:00

    Hi @Freek Brouwer , Currently Members property in "Group" resource or MembersToInclude property in "GroupSet" resource cannot be empty as they expect at least 1 value so you may submit a feature request here to have a feature to allow empty value for Members property in "Group" resource or MembersToInclude property in "GroupSet" resource.

    But to accomplish requirement with resources that are currently available, go with any of below 2 approaches.

    1. Use "Script" resource instead of "Group" / "GroupSet" resource
    2. Use "Group" resource to ensure replace current group membership with only a single particular member as exception

    PFA Approach-1.ps1.txt and Approach-2.ps1.txt for configuration files.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.