XGroup xPSDesiredStateConfiguration

Welcome Forums DSC (Desired State Configuration) XGroup xPSDesiredStateConfiguration

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
12 months ago.

  • Author
    Posts
  • #89675

    Participant
    Points: 0
    Rank: Member

    Hi,

    Can someone tell me what are the steps needed to use xGroup within my HTTPS Pull server and having a node pick up the xGroup settings and set accordingly ? I have the following set and run it with no errors but do not get any changes in the local Administrators group on my Node:

    Configuration Sample_xGroup_SetMembers
    {
    [CmdletBinding()]
    param ()

    Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'

    xGroup Group1
    {
    GroupName = 'GroupName1'
    Ensure = 'Present'
    Memberstoinclude = @( 'domain\User1', 'domain\users2' )
    }

    Thanks

  • #89701

    Participant
    Points: 5
    Rank: Member

    Hi,

    I looks like you are missing the Node statement.

    Configuration Sample_xGroup_SetMembers
    {
    [CmdletBinding()]
    param ()
    
    Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'
    
    Node LocalHost {
    
    xGroup Group1
          {
              GroupName = 'GroupName1'
              Ensure = 'Present'
              Memberstoinclude = @( 'domain\User1', 'domain\users2' )
          }
       }
    }
    

The topic ‘XGroup xPSDesiredStateConfiguration’ is closed to new replies.