XGroup xPSDesiredStateConfiguration

This topic contains 1 reply, has 2 voices, and was last updated by  TommyQuality 1 month ago.

  • Author
    Posts
  • #89675

    Mike
    Participant

    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

    TommyQuality
    Participant

    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' )
          }
       }
    }
    

You must be logged in to reply to this topic.