Add Group resource

This commit is contained in:
Katie Keim
2016-10-07 23:37:35 -07:00
parent 335e3b79c1
commit 645237aa35
13 changed files with 5531 additions and 3 deletions
@@ -0,0 +1,44 @@
<#
.SYNOPSIS
Creates a group with the specified name and members included or modifies the members of a group if
the named group already exists.
.PARAMETER GroupName
The name of the group to create or modify.
.PARAMETER MembersToInclude
The list of members the group should contain.
The default value is an empty list.
.PARAMETER MembersToExclude
The list of members the group should not contain.
The default value is an empty list.
#>
Configuration Sample_Group
{
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$GroupName,
[String[]]
$MembersToInclude = @(),
[String[]]
$MembersToExclude = @()
)
Import-DscResource -ModuleName 'PSDscResources'
Group Group1
{
GroupName = $GroupName
Ensure = 'Present'
MembersToInclude = $MembersToInclude
MembersToExclude = $MembersToExclude
}
}
Sample_Group