Files
PowerShell-PSDscResources/Examples/Sample_GroupSet_AddMembers.ps1
T
Simon Heather 2a7b5eef2b Revert "Fix example dir BOM files"
This reverts commit 590a77441f.
2019-04-28 18:49:16 +01:00

24 lines
716 B
PowerShell

<#
.SYNOPSIS
If the groups named GroupName1 and Administrators do not exist, creates the groups named
GroupName1 and Administrators and adds the users with the usernames Username1 and Username2
to both groups.
If the groups named GroupName1 and Administrators already exist, adds the users with the
usernames Username1 and Username2 to both groups.
#>
Configuration Sample_GroupSet_AddMembers
{
[CmdletBinding()]
param ()
Import-DscResource -ModuleName 'PSDscResources'
GroupSet GroupSet
{
GroupName = @( 'Administrators', 'GroupName1' )
Ensure = 'Present'
MembersToInclude = @( 'Username1', 'Username2' )
}
}