Code Monkey home page Code Monkey logo

clocalgroup's Introduction

cLocalGroup

The cLocalGroup module contains the cLocalGroup DSC resource that provides a mechanism to manage local groups.

Unlike the Group built-in DSC resource, the cLocalGroup resource does not require the Credential property to add non-local accounts to the group. However, this is not guaranteed to work in all environments.

You can also download this module from the PowerShell Gallery.

Resources

cLocalGroup

  • Ensure: Indicates if the group exists. Set this property to Absent to ensure that the group does not exist. Setting it to Present (the default value) ensures that the group exists.
  • GroupName: Indicates the name of the group.
  • Description: Indicates the description of the group.
  • Members: Indicates that you want to ensure these members form the group.
  • MembersToExclude: Indicates the users who you want ensure are not members of this group.
  • MembersToInclude: Indicates the users who you want to ensure are members of the group.

Note: The Members property cannot be combined with either of the MembersToExclude or MembersToInclude properties.

Versions

1.0.1 (October 15, 2015)

  • Minor update.

1.0.0 (October 5, 2015)

  • Initial release with the following resources:
    • cLocalGroup.

Examples

This configuration will ensure that two local groups exist (with or without the specified members).

configuration Sample_cLocalGroup
{
    Import-DscResource -ModuleName cLocalGroup

    cLocalGroup LocalGroup1
    {
        Ensure = 'Present'
        GroupName = 'Group-1'
        Description = 'Created by the cLocalGroup DSC resource'
        Members = 'IIS APPPOOL\DefaultAppPool', 'NT AUTHORITY\IUSR'
    }

    cLocalGroup LocalGroup2
    {
        Ensure = 'Present'
        GroupName = 'Group-2'
        Description = 'Created by the cLocalGroup DSC resource'
        MembersToExclude = "$Env:UserDomain\Domain Users", 'Guest'
        MembersToInclude = "$Env:UserDomain\$Env:UserName", 'BUILTIN\Administrators'
    }
}

Sample_cLocalGroup -OutputPath "$Env:SystemDrive\Sample_cLocalGroup"

Start-DscConfiguration -Path "$Env:SystemDrive\Sample_cLocalGroup" -Force -Verbose -Wait

Get-DscConfiguration

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.